diff src/org/tmatesoft/hg/repo/Revlog.java @ 183:9807bf8f3a9c

Do not assume second parent can be set only when first one is set
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 13 Apr 2011 14:15:13 +0200
parents 2c3e96674e2a
children b777502a06f5
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/Revlog.java	Tue Apr 12 19:36:18 2011 +0200
+++ b/src/org/tmatesoft/hg/repo/Revlog.java	Wed Apr 13 14:15:13 2011 +0200
@@ -230,9 +230,9 @@
 					allNodes.add(nid);
 					if (parent1Revision != -1) {
 						firstParent.put(nid, sequentialRevisionNodeids[parent1Revision]);
-						if (parent2Revision != -1) {
-							secondParent.put(nid, sequentialRevisionNodeids[parent2Revision]);
-						}
+					}
+					if (parent2Revision != -1) { // revlog of DataAccess.java has p2 set when p1 is -1  
+						secondParent.put(nid, sequentialRevisionNodeids[parent2Revision]);
 					}
 				}
 			};