diff cmdline/org/tmatesoft/hg/console/Log.java @ 124:cea84c5995e6

Changeset to access parent nodeids
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 15 Feb 2011 06:30:05 +0100
parents a3a2e5deb320
children 645829962785
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Log.java	Fri Feb 04 04:06:44 2011 +0100
+++ b/cmdline/org/tmatesoft/hg/console/Log.java	Tue Feb 15 06:30:05 2011 +0100
@@ -176,12 +176,14 @@
 				sb.append('\n');
 			}
 			if (complete) {
-				if (changelogWalker == null) {
-					changelogWalker = repo.getChangelog().new ParentWalker();
-					changelogWalker.init();
-				}
-				Nodeid p1 = changelogWalker.safeFirstParent(csetNodeid);
-				Nodeid p2 = changelogWalker.safeSecondParent(csetNodeid);
+//				if (changelogWalker == null) {
+//					changelogWalker = repo.getChangelog().new ParentWalker();
+//					changelogWalker.init();
+//				}
+//				Nodeid p1 = changelogWalker.safeFirstParent(csetNodeid);
+//				Nodeid p2 = changelogWalker.safeSecondParent(csetNodeid);
+				Nodeid p1 = cset.getFirstParentRevision();
+				Nodeid p2 = cset.getSecondParentRevision();
 				int p1x = p1 == Nodeid.NULL ? -1 : repo.getChangelog().getLocalRevision(p1);
 				int p2x = p2 == Nodeid.NULL ? -1 : repo.getChangelog().getLocalRevision(p2);
 				int mx = repo.getManifest().getLocalRevision(cset.getManifestRevision());