diff cmdline/org/tmatesoft/hg/console/ChangesetDumpHandler.java @ 502:37d97854c6ad

Respect changesets with no list of changed files, as discovered with Issue 41
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 29 Oct 2012 20:06:16 +0100
parents 7bcfbc255f48
children 6526d8adbc0f
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/ChangesetDumpHandler.java	Mon Oct 29 19:04:13 2012 +0100
+++ b/cmdline/org/tmatesoft/hg/console/ChangesetDumpHandler.java	Mon Oct 29 20:06:16 2012 +0100
@@ -109,9 +109,10 @@
 			f.format("phase:       %s\n", cset.getPhase().name());
 			Nodeid p1 = cset.getFirstParentRevision();
 			Nodeid p2 = cset.getSecondParentRevision();
+			Nodeid mr = cset.getManifestRevision();
 			int p1x = p1.isNull() ? -1 : repo.getChangelog().getRevisionIndex(p1);
 			int p2x = p2.isNull() ? -1 : repo.getChangelog().getRevisionIndex(p2);
-			int mx = repo.getManifest().getRevisionIndex(cset.getManifestRevision());
+			int mx = mr.isNull() ? -1 : repo.getManifest().getRevisionIndex(mr);
 			f.format("parent:      %d:%s\nparent:      %d:%s\nmanifest:    %d:%s\n", p1x, p1, p2x, p2, mx, cset.getManifestRevision());
 		}
 		f.format("user:        %s\ndate:        %s\n", cset.getUser(), cset.getDate().toString());