diff 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
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/RepositoryComparator.java	Wed Apr 13 14:15:13 2011 +0200
+++ b/src/org/tmatesoft/hg/internal/RepositoryComparator.java	Wed Apr 13 19:09:10 2011 +0200
@@ -181,6 +181,8 @@
 					chainElement = new BranchChain(rb.head);
 					// record this unknown branch to download later
 					branches2load.add(chainElement);
+					// the only chance we'll need chainElement in the head2chain is when we know this branch's root 
+					head2chain.put(rb.head, chainElement);
 				}
 				if (localRepo.knownNode(rb.root)) {
 					// we known branch start, common head is somewhere in its descendants line  
@@ -203,8 +205,9 @@
 			Nodeid h = rb.head;
 			Nodeid r = rb.root;
 			int watchdog = 1000;
+			assert head2chain.containsKey(h);
 			BranchChain bc = head2chain.get(h);
-			assert bc != null;
+			assert bc != null : h.toString();
 			// if we know branch root locally, there could be no parent branch chain elements.
 			assert bc.p1 == null;
 			assert bc.p2 == null;