Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/PhasesHelper.java @ 448:2e402c12ebc6 smartgit3
Issue 31: Revlog#walk() fails with AIOOBE when start > 0
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Wed, 06 Jun 2012 21:23:57 +0200 |
| parents | 056f724bdc21 |
| children | 5787e912f60e |
comparison
equal
deleted
inserted
replaced
| 447:056f724bdc21 | 448:2e402c12ebc6 |
|---|---|
| 112 * (a) collect only for a subset of repository, | 112 * (a) collect only for a subset of repository, |
| 113 * (b) be able to answer isDescendant(int csetRevIndex) using absolute indexing (i.e bitAt(csetRevIndex - rootRevIndex)) | 113 * (b) be able to answer isDescendant(int csetRevIndex) using absolute indexing (i.e bitAt(csetRevIndex - rootRevIndex)) |
| 114 */ | 114 */ |
| 115 final HashSet<Nodeid> parents2consider = new HashSet<Nodeid>(roots); | 115 final HashSet<Nodeid> parents2consider = new HashSet<Nodeid>(roots); |
| 116 final boolean[] result = new boolean[] { false }; | 116 final boolean[] result = new boolean[] { false }; |
| 117 hgRepo.getChangelog().walk(0/*earlierstRootRevIndex*/, csetRevIndex, new HgChangelog.ParentInspector() { | 117 hgRepo.getChangelog().walk(earliestRootRevIndex, csetRevIndex, new HgChangelog.ParentInspector() { |
| 118 | 118 |
| 119 public void next(int revisionIndex, Nodeid revision, int parent1, int parent2, Nodeid nidParent1, Nodeid nidParent2) { | 119 public void next(int revisionIndex, Nodeid revision, int parent1, int parent2, Nodeid nidParent1, Nodeid nidParent2) { |
| 120 boolean descendant = false; | 120 boolean descendant = false; |
| 121 if (!nidParent1.isNull() && parents2consider.contains(nidParent1)) { | 121 if (!nidParent1.isNull() && parents2consider.contains(nidParent1)) { |
| 122 parents2consider.add(revision); | 122 parents2consider.add(revision); |
