Mercurial > hg4j
comparison test/org/tmatesoft/hg/test/MapTagsToFileRevisions.java @ 431:12f668401613
FIXMEs: awkward API refactored, what need to be internal got hidden; public aspects got captured in slim interfaces
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 29 Mar 2012 20:54:04 +0200 |
parents | 31a89587eb04 |
children | be697c3e951e |
comparison
equal
deleted
inserted
replaced
430:d280759c2a3f | 431:12f668401613 |
---|---|
117 final long end_2 = System.nanoTime(); | 117 final long end_2 = System.nanoTime(); |
118 Assert.assertEquals(changesetToNodeid_1, changesetToNodeid_2); | 118 Assert.assertEquals(changesetToNodeid_1, changesetToNodeid_2); |
119 // | 119 // |
120 final long start_3 = System.nanoTime(); | 120 final long start_3 = System.nanoTime(); |
121 final Map<Nodeid, Nodeid> changesetToNodeid_3 = new HashMap<Nodeid, Nodeid>(); | 121 final Map<Nodeid, Nodeid> changesetToNodeid_3 = new HashMap<Nodeid, Nodeid>(); |
122 fileNode.walk(0, TIP, new HgDataFile.RevisionInspector() { | 122 fileNode.indexWalk(0, TIP, new HgDataFile.RevisionInspector() { |
123 | 123 |
124 public void next(int fileRevisionIndex, Nodeid revision, int linkedRevisionIndex) { | 124 public void next(int fileRevisionIndex, Nodeid revision, int linkedRevisionIndex) { |
125 changesetToNodeid_3.put(clog.getRevision(linkedRevisionIndex), revision); | 125 changesetToNodeid_3.put(clog.getRevision(linkedRevisionIndex), revision); |
126 } | 126 } |
127 }); | 127 }); |
358 } | 358 } |
359 }; | 359 }; |
360 repository.getManifest().walkFileRevisions(targetPath, collectFileRevAtCset,tagLocalRevs); | 360 repository.getManifest().walkFileRevisions(targetPath, collectFileRevAtCset,tagLocalRevs); |
361 | 361 |
362 final long start2a = System.nanoTime(); | 362 final long start2a = System.nanoTime(); |
363 fileNode.walk(0, lastRev, new HgDataFile.RevisionInspector() { | 363 fileNode.indexWalk(0, lastRev, new HgDataFile.RevisionInspector() { |
364 | 364 |
365 public void next(int fileRevisionIndex, Nodeid fileRevision, int changesetRevisionIndex) { | 365 public void next(int fileRevisionIndex, Nodeid fileRevision, int changesetRevisionIndex) { |
366 List<String> associatedTags = new LinkedList<String>(); | 366 List<String> associatedTags = new LinkedList<String>(); |
367 for (int taggetRevision : tagLocalRevs) { | 367 for (int taggetRevision : tagLocalRevs) { |
368 // current file revision can't appear in tags that point to earlier changelog revisions (they got own file revision) | 368 // current file revision can't appear in tags that point to earlier changelog revisions (they got own file revision) |