Package org.eclipse.jgit.revwalk

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


    @Override
    public Context doApply(Context context) throws Throwable {
        RevWalk walk = new RevWalk(context.getRepository());

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


    // takes about 1 sec to count 69939 in intellijidea repo
    private static int countCommits(FileRepository repo, ObjectId revision) throws IOException {
        RevWalk walk = new RevWalk(repo);
        walk.setRetainBody(false);
        RevCommit head = walk.parseCommit(revision);
        walk.markStart(head);
        int res = 0;
        for (RevCommit commit : walk) res += 1;
        return res;
    }
}
View Full Code Here

      tw.setFilter(TreeFilter.ANY_DIFF);
      tw.setRecursive(true);

      ObjectId start = db.resolve(Constants.HEAD);
      startId = or.abbreviate(start);
      rw.markStart(rw.parseCommit(start));
      for (;;) {
        final RevCommit c = rw.next();
        if (c == null)
          break;
        commits++;
View Full Code Here

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

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

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

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

            if (!localCommit.equals(remoteCommit))
            {
                behind = true;
                walk.setRevFilter(RevFilter.MERGE_BASE);
                walk.markStart(localCommit);
                walk.markStart(remoteCommit);

                RevCommit base = walk.next();
                if (null != base)
                {
View Full Code Here

            if (!localCommit.equals(remoteCommit))
            {
                behind = true;
                walk.setRevFilter(RevFilter.MERGE_BASE);
                walk.markStart(localCommit);
                walk.markStart(remoteCommit);

                RevCommit base = walk.next();
                if (null != base)
                {
                    walk.parseBody(base);
View Full Code Here

        throw new MissingBundlePrerequisiteException(transport.uri,
            missing);

      for (final Ref r : transport.local.getAllRefs().values()) {
        try {
          rw.markStart(rw.parseCommit(r.getObjectId()));
        } catch (IOException readError) {
          // If we cannot read the value of the ref skip it.
        }
      }
View Full Code Here

        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

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.