Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgManifest.java @ 222:373e07cd3991
Due to discrepancy in manifest and changelor indexes, wrong manifest revisions got cached and compared
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 19 May 2011 05:02:07 +0200 |
parents | 8de327242aa0 |
children | b7347daa50e3 |
comparison
equal
deleted
inserted
replaced
221:04735ce6bed2 | 222:373e07cd3991 |
---|---|
67 } | 67 } |
68 return revisionMap.at(revisionNumber); | 68 return revisionMap.at(revisionNumber); |
69 } | 69 } |
70 | 70 |
71 public interface Inspector { | 71 public interface Inspector { |
72 boolean begin(int revision, Nodeid nid); | 72 boolean begin(int mainfestRevision, Nodeid nid, int changelogRevision); |
73 boolean next(Nodeid nid, String fname, String flags); | 73 boolean next(Nodeid nid, String fname, String flags); |
74 boolean end(int revision); | 74 boolean end(int manifestRevision); |
75 } | 75 } |
76 | 76 |
77 private static class ManifestParser implements RevlogStream.Inspector { | 77 private static class ManifestParser implements RevlogStream.Inspector { |
78 private boolean gtg = true; // good to go | 78 private boolean gtg = true; // good to go |
79 private final Inspector inspector; | 79 private final Inspector inspector; |
92 public void next(int revisionNumber, int actualLen, int baseRevision, int linkRevision, int parent1Revision, int parent2Revision, byte[] nodeid, DataAccess da) { | 92 public void next(int revisionNumber, int actualLen, int baseRevision, int linkRevision, int parent1Revision, int parent2Revision, byte[] nodeid, DataAccess da) { |
93 if (!gtg) { | 93 if (!gtg) { |
94 return; | 94 return; |
95 } | 95 } |
96 try { | 96 try { |
97 gtg = gtg && inspector.begin(revisionNumber, new Nodeid(nodeid, true)); | 97 gtg = gtg && inspector.begin(revisionNumber, new Nodeid(nodeid, true), linkRevision); |
98 int i; | 98 int i; |
99 String fname = null; | 99 String fname = null; |
100 String flags = null; | 100 String flags = null; |
101 Nodeid nid = null; | 101 Nodeid nid = null; |
102 byte[] data = da.byteArray(); | 102 byte[] data = da.byteArray(); |