Package org.eclipse.jgit.revwalk

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


    walk.sort(RevSort.TOPO);
    walk.sort(RevSort.REVERSE, true);
    try {
      RevCommit tip = walk.parseCommit(getRepository().resolve(tipId));
      RevCommit base = walk.parseCommit(getRepository().resolve(baseId));
      walk.markStart(tip);
      walk.markUninteresting(base);
      for (;;) {
        RevCommit c = walk.next();
        if (c == null) {
          break;
View Full Code Here


        ByteArrayOutputStream os = new ByteArrayOutputStream();
        byte[] tmp = new byte[32767];

        RevWalk commitWalk = new RevWalk(reader);
        commitWalk.markStart(tip);

        RevCommit commit;
        while ((paths.size() > 0) && (commit = commitWalk.next()) != null) {
          TreeWalk diffWalk = new TreeWalk(reader);
          int parentCount = commit.getParentCount();
View Full Code Here

          result.branchCount += 1;
        }

        // traverse the log and index the previous commit objects
        RevWalk historyWalk = new RevWalk(reader);
        historyWalk.markStart(historyWalk.parseCommit(tip.getId()));
        RevCommit rev;
        while ((rev = historyWalk.next()) != null) {
          String hash = rev.getId().getName();
          if (indexedCommits.add(hash)) {
            Document doc = createDocument(rev, tags.get(hash));
View Full Code Here

      throw new IllegalArgumentException(
          Assert.formatNotNull("Starting commit id"));

    final RevWalk walk = createWalk(repository);
    try {
      walk.markStart(walk.parseCommit(start));
      if (end != null)
        walk.markUninteresting(walk.parseCommit(end));
      walk(walk);
    } catch (IOException e) {
      throw new GitException(e, repository);
View Full Code Here

      final Collection<RevCommit> commits = CommitUtils.getTags(repo);
      if (commits.isEmpty())
        continue;
      final RevWalk walk = createWalk(repo);
      try {
        walk.markStart(commits);
        walk(walk);
      } catch (IOException e) {
        throw new GitException(e, repo);
      } finally {
        walk.release();
View Full Code Here

      final Collection<RevCommit> commits = CommitUtils.getBranches(repo);
      if (commits.isEmpty())
        continue;
      final RevWalk walk = createWalk(repo);
      try {
        walk.markStart(commits);
        walk(walk);
      } catch (IOException e) {
        throw new GitException(e, repo);
      } finally {
        walk.release();
View Full Code Here

      final ObjectId... commits) {
    final RevWalk walk = new RevWalk(repository);
    walk.setRevFilter(MERGE_BASE);
    try {
      for (int i = 0; i < commits.length; i++)
        walk.markStart(walk.parseCommit(commits[i]));
      final RevCommit base = walk.next();
      if (base != null)
        walk.parseBody(base);
      return base;
    } catch (IOException e) {
View Full Code Here

      throw new IllegalArgumentException(Assert.formatNotEmpty("Path"));

    final RevWalk walk = new RevWalk(repository);
    walk.setRetainBody(true);
    try {
      walk.markStart(walk
          .parseCommit(strictResolve(repository, revision)));
      walk.setTreeFilter(PathFilterUtils.and(path));
      return walk.next();
    } catch (IOException e) {
      throw new GitException(e, repository);
View Full Code Here

    assertEquals(MergeStatus.MERGED, result.getMergeStatus());
    RebaseResult res = git.rebase().setUpstream("refs/heads/master").call();
    assertEquals(Status.OK, res.getStatus());

    RevWalk rw = new RevWalk(db);
    rw.markStart(rw.parseCommit(db.resolve("refs/heads/topic")));
    assertDerivedFrom(rw.next(), e);
    assertDerivedFrom(rw.next(), d);
    assertDerivedFrom(rw.next(), c);
    assertEquals(b, rw.next());
    assertEquals(a, rw.next());
View Full Code Here

      assertEquals("f new resolved", read("conflict"));
    assertEquals("blah", read(FILE1));
    assertEquals("file2", read("file2"));
    assertEquals("more change", read("file3"));

    rw.markStart(rw.parseCommit(db.resolve("refs/heads/topic")));
    RevCommit newF = rw.next();
    assertDerivedFrom(newF, f);
    assertEquals(2, newF.getParentCount());
    RevCommit newD = rw.next();
    assertDerivedFrom(newD, d);
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.