diff src/org/tmatesoft/hg/internal/RepositoryComparator.java @ 210:6a2481866491

Wrong parent assignment when building branch chain
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 28 Apr 2011 03:55:23 +0200
parents 9ce3b26798c4
children 41a778e3fd31
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/RepositoryComparator.java	Thu Apr 28 03:44:45 2011 +0200
+++ b/src/org/tmatesoft/hg/internal/RepositoryComparator.java	Thu Apr 28 03:55:23 2011 +0200
@@ -260,7 +260,7 @@
 						if (bc == null) {
 							head2chain.put(rb.p1, bc = new BranchChain(rb.p1));
 						}
-						chainElement.p2 = bc;
+						chainElement.p1 = bc;
 					}
 					if (hasP2 && !localRepo.knownNode(rb.p2)) {
 						toQuery.add(rb.p2);
@@ -373,9 +373,13 @@
 		private void internalDump(String prefix) {
 			if (p1 != null) {
 				System.out.println(prefix + p1.toString());
+			} else if (p2 != null) {
+				System.out.println(prefix + "NONE?!");
 			}
 			if (p2 != null) {
 				System.out.println(prefix + p2.toString());
+			} else if (p1 != null) {
+				System.out.println(prefix + "NONE?!");
 			}
 			prefix += "  ";
 			if (p1 != null) {