Package org.eclipse.jgit.revwalk

Examples of org.eclipse.jgit.revwalk.RevWalk.markStart()


        if ( toRevId != null )
        {
            RevCommit c = walk.parseCommit( toRevId );
            c.remove( RevFlag.UNINTERESTING );
            RevCommit real = walk.parseCommit( c );
            walk.markStart( real );
        }
        else
        {
            final ObjectId head = repo.resolve( Constants.HEAD );
            if ( head == null )
View Full Code Here


            if ( head == null )
            {
                throw new RuntimeException( "Cannot resolve " + Constants.HEAD );
            }
            RevCommit real = walk.parseCommit( head );
            walk.markStart( real );
        }

        int n = 0;
        for ( final RevCommit c : walk )
        {
View Full Code Here

    public void walkCommits(CommitWalkAction action)
            throws GitRepositoryException {
        try {
            RevWalk revWalk = this.getRevWalk();
            revWalk.markStart(this.getCommit(this.getHeadObject()));

            RevCommit commit;
            while((commit = revWalk.next()) != null) {
                action.execute(new JGitCommit(commit));
            }
View Full Code Here

    @Override
    public Context apply(final Context context) {
        try {
            final RevWalk walk = new RevWalk(context.getRepository());

            walk.markStart(
                FluentIterable
                    .from(context.getRefs())
                    .transform(new RefToRevCommit(walk))
                    .toList()
            );
View Full Code Here

    @Override
    public Context apply(final Context context) {
        try {
            final RevWalk walk = new RevWalk(context.getRepository());

            walk.markStart(
                FluentIterable
                    .from(context.getRefs())
                    .transform(new RefToRevCommit(walk))
                    .toList()
            );
View Full Code Here

            if (!localCommit.equals(remoteCommit))
            {
                reporter.debugText(getCommandName(),localCommit.getName() + " !equals " + remoteCommit.getName());
                behind = true;
                walk.setRevFilter(RevFilter.MERGE_BASE);
                walk.markStart(localCommit);
                walk.markStart(remoteCommit);

                RevCommit base = walk.next();
                reporter.debugText(getCommandName(),"checking if remote is at our merge base");
                if (null != base)
View Full Code Here

            {
                reporter.debugText(getCommandName(),localCommit.getName() + " !equals " + remoteCommit.getName());
                behind = true;
                walk.setRevFilter(RevFilter.MERGE_BASE);
                walk.markStart(localCommit);
                walk.markStart(remoteCommit);

                RevCommit base = walk.next();
                reporter.debugText(getCommandName(),"checking if remote is at our merge base");
                if (null != base)
                {
View Full Code Here

        try {
            walk = new RevWalk(repository);
            ObjectId from = repository.resolve(fromBranch);
            ObjectId to = repository.resolve(toBranch);

            walk.markStart(walk.parseCommit(from));
            walk.markUninteresting(walk.parseCommit(to));

            return IteratorUtils.toList(walk.iterator());
        } finally {
            if (walk != null) {
View Full Code Here

    private static User getAuthorFromFirstCommit(Repository repository, String path, RevCommit start)
            throws IOException {
        RevWalk revWalk = null;
        try {
            revWalk = new RevWalk(repository);
            revWalk.markStart(start);
            revWalk.setTreeFilter(PathFilter.create(path));
            revWalk.sort(RevSort.REVERSE);
            RevCommit commit = revWalk.next();
            if (commit == null) {
                return User.anonymous;
View Full Code Here

        try {
            ObjectId endRange = command.getNewId();
            ObjectId startRange = command.getOldId();

            RevWalk rw = new RevWalk(repository);
            rw.markStart(rw.parseCommit(endRange));
            if (startRange.equals(ObjectId.zeroId())) {
                // maybe this is a tag or an orphan branch
                list.add(rw.parseCommit(endRange));
                rw.dispose();
                return list;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.