Mercurial > hg4j
diff cmdline/org/tmatesoft/hg/console/Main.java @ 270:c6450b0b1fd5
Avoid IAE:nullid when looking into stale merge/state file
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 24 Aug 2011 04:10:17 +0200 |
parents | a620f0663a37 |
children | 6d1804fe0ed7 |
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Main.java Tue Aug 23 23:47:38 2011 +0200 +++ b/cmdline/org/tmatesoft/hg/console/Main.java Wed Aug 24 04:10:17 2011 +0200 @@ -77,14 +77,14 @@ public static void main(String[] args) throws Exception { Main m = new Main(args); - m.testTreeTraversal(); +// m.testTreeTraversal(); // m.testRevisionMap(); // m.testSubrepos(); // m.testReadWorkingCopy(); // m.testParents(); // m.testEffectiveFileLog(); // m.testCatAtCsetRevision(); -// m.testMergeState(); + m.testMergeState(); // m.testFileStatus(); // m.dumpBranches(); // m.inflaterLengthException(); @@ -247,6 +247,8 @@ private void testMergeState() throws Exception { final HgMergeState mergeState = hgRepo.getMergeState(); mergeState.refresh(); + System.out.printf("isMerging: %s, isStale: %s.\n", mergeState.isMerging(), mergeState.isStale()); + System.out.printf("P1:%s\nP2:%s\nState parent:%s\n",mergeState.getFirstParent().shortNotation(), mergeState.getSecondParent().shortNotation(), mergeState.getStateParent().shortNotation()); for (HgMergeState.Entry e : mergeState.getConflicts()) { System.out.println(e.getState() + " " + e.getActualFile()); System.out.println("p1: " + formatFileRevision(e.getFirstParent()));