Mercurial > hg4j
comparison src/org/tmatesoft/hg/internal/RepositoryComparator.java @ 184:ec1820f64d2b
Complete incoming cmdline client, with both lite (revisions) and complete (full changeset) information dump
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 13 Apr 2011 19:09:10 +0200 |
parents | cd3371670f0b |
children | e5407b5a586a |
comparison
equal
deleted
inserted
replaced
183:9807bf8f3a9c | 184:ec1820f64d2b |
---|---|
179 BranchChain chainElement = head2chain.get(rb.head); | 179 BranchChain chainElement = head2chain.get(rb.head); |
180 if (chainElement == null) { | 180 if (chainElement == null) { |
181 chainElement = new BranchChain(rb.head); | 181 chainElement = new BranchChain(rb.head); |
182 // record this unknown branch to download later | 182 // record this unknown branch to download later |
183 branches2load.add(chainElement); | 183 branches2load.add(chainElement); |
184 // the only chance we'll need chainElement in the head2chain is when we know this branch's root | |
185 head2chain.put(rb.head, chainElement); | |
184 } | 186 } |
185 if (localRepo.knownNode(rb.root)) { | 187 if (localRepo.knownNode(rb.root)) { |
186 // we known branch start, common head is somewhere in its descendants line | 188 // we known branch start, common head is somewhere in its descendants line |
187 checkUp2Head.add(rb); | 189 checkUp2Head.add(rb); |
188 } else { | 190 } else { |
201 } | 203 } |
202 for (RemoteBranch rb : checkUp2Head) { | 204 for (RemoteBranch rb : checkUp2Head) { |
203 Nodeid h = rb.head; | 205 Nodeid h = rb.head; |
204 Nodeid r = rb.root; | 206 Nodeid r = rb.root; |
205 int watchdog = 1000; | 207 int watchdog = 1000; |
208 assert head2chain.containsKey(h); | |
206 BranchChain bc = head2chain.get(h); | 209 BranchChain bc = head2chain.get(h); |
207 assert bc != null; | 210 assert bc != null : h.toString(); |
208 // if we know branch root locally, there could be no parent branch chain elements. | 211 // if we know branch root locally, there could be no parent branch chain elements. |
209 assert bc.p1 == null; | 212 assert bc.p1 == null; |
210 assert bc.p2 == null; | 213 assert bc.p2 == null; |
211 do { | 214 do { |
212 List<Nodeid> between = remoteRepo.between(h, r); | 215 List<Nodeid> between = remoteRepo.between(h, r); |