Examples of indexWalk()


Examples of org.tmatesoft.hg.repo.HgDataFile.indexWalk()

      public void next(int localRevision, Nodeid revision, int linkedRevision) {
        Assert.assertEquals(localRevision, linkedRevision);
      }
    });
    final HgDataFile fileNode = repository.getFileNode("file1");
    fileNode.indexWalk(0, TIP, new HgDataFile.RevisionInspector() {
      int i = 0;

      public void next(int localRevision, Nodeid revision, int linkedRevision) throws HgRuntimeException {
        assertEquals(i++, localRevision);
        assertEquals(fileNode.getChangesetRevisionIndex(localRevision), linkedRevision);
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgDataFile.indexWalk()

            Assert.assertTrue(nidParent2 == all[parent2-start]);
          }
        }
      }
    };
    fileNode.indexWalk(0, TIP, new ParentInspectorCheck(0, fileNode.getRevisionCount()));
    assert fileNode.getRevisionCount() > 2 : "prereq"; // need at least few revisions
    // there used to be a defect in #walk impl, assumption all parents come prior to a revision
    fileNode.indexWalk(1, 3, new ParentInspectorCheck(1, 3));
  }
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgDataFile.indexWalk()

      }
    };
    fileNode.indexWalk(0, TIP, new ParentInspectorCheck(0, fileNode.getRevisionCount()));
    assert fileNode.getRevisionCount() > 2 : "prereq"; // need at least few revisions
    // there used to be a defect in #walk impl, assumption all parents come prior to a revision
    fileNode.indexWalk(1, 3, new ParentInspectorCheck(1, 3));
  }

  /*
   * This test checks not only RevisionDescendants class, but also
   * Revlog.indexWalk implementation defect, aka:
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgDataFile.indexWalk()

      HgDataFile fileNode = qe.file();
      // TODO int fileLastRevIndexToVisit = qe.fileTo
      int fileLastRevIndexToVisit = followAncestry ? fileNode.getRevisionIndex(qe.lastFileRev()) : fileNode.getLastRevision();
      completeHistory = new HistoryNode[fileLastRevIndexToVisit+1];
      commitRevisions = new int[completeHistory.length];
      fileNode.indexWalk(qe.fileFrom(), fileLastRevIndexToVisit, this);
      if (!followAncestry) {
        resultHistory = new ArrayList<HistoryNode>(fileLastRevIndexToVisit - qe.fileFrom() + 1);
        // items in completeHistory with index < qe.fileFrom are empty
        for (int i = qe.fileFrom(); i <= fileLastRevIndexToVisit; i++) {
          resultHistory.add(completeHistory[i]);
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgDataFile.indexWalk()

      final long end_2 = System.nanoTime();
      Assert.assertEquals(changesetToNodeid_1, changesetToNodeid_2);
      //
      final long start_3 = System.nanoTime();
      final Map<Nodeid, Nodeid> changesetToNodeid_3 = new HashMap<Nodeid, Nodeid>();
      fileNode.indexWalk(0, TIP, new HgDataFile.RevisionInspector() {
 
        public void next(int fileRevisionIndex, Nodeid revision, int linkedRevisionIndex) throws HgRuntimeException {
          changesetToNodeid_3.put(clog.getRevision(linkedRevisionIndex), revision);
        }
      });
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgDataFile.indexWalk()

      }
    };
    repository.getManifest().walkFileRevisions(targetPath, collectFileRevAtCset,tagLocalRevs);
   
    final long start2a = System.nanoTime();
    fileNode.indexWalk(0, TIP, new HgDataFile.RevisionInspector() {

      public void next(int fileRevisionIndex, Nodeid fileRevision, int changesetRevisionIndex) {
        List<String> associatedTags = new LinkedList<String>();
       
        for (int taggedRevision : tagLocalRevs) {
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.