diff hgext/imerge.py @ 6213:5c5e45766224

imerge: Fix unbound name error and add a test case
author Joel Rosdahl <joel@rosdahl.net>
date Thu, 06 Mar 2008 22:23:41 +0100
parents f89fd07fc51d
children c0c4c7b1e8d3
line wrap: on
line diff
--- a/hgext/imerge.py	Thu Mar 06 22:23:41 2008 +0100
+++ b/hgext/imerge.py	Thu Mar 06 22:23:41 2008 +0100
@@ -8,7 +8,7 @@
 from mercurial.i18n import _
 from mercurial.node import hex, short
 from mercurial import commands, cmdutil, dispatch, fancyopts
-from mercurial import hg, filemerge, util
+from mercurial import hg, filemerge, util, revlog
 import os, tarfile
 
 class InvalidStateFileException(Exception): pass
@@ -78,8 +78,8 @@
 
         try:
             parents = [self.repo.changectx(n) for n in status[:2]]
-        except LookupError:
-            raise util.Abort('merge parent %s not in repository' % short(p))
+        except revlog.LookupError, e:
+            raise util.Abort('merge parent %s not in repository' % e.name)
 
         status = status[2:]
         conflicts = int(status.pop(0)) * 3