Merge after backout
authorChristian Ebert <blacktrash@gmx.net>
Thu, 12 Jun 2008 02:35:38 +0200
changeset 460 d9aae4cd69be
parent 457 5e2be38cb3dd (diff)
parent 459 df56cd11458d (current diff)
child 461 2275041e7deb
Merge after backout Revert to dispatch._parse for grabbing current command name.
hgkw/keyword.py
--- a/hgkw/keyword.py	Thu Jun 12 02:33:41 2008 +0200
+++ b/hgkw/keyword.py	Thu Jun 12 02:35:38 2008 +0200
@@ -265,11 +265,13 @@
 
 def _kwfwrite(ui, repo, expand, *pats, **opts):
     '''Selects files and passes them to kwtemplater.overwrite.'''
+    if repo.dirstate.parents()[1] != nullid:
+        raise util.Abort(_('outstanding uncommitted merge'))
     kwt = kwtools['templater']
     status = _status(ui, repo, kwt, *pats, **opts)
     modified, added, removed, deleted, unknown, ignored, clean = status
     if modified or added or removed or deleted:
-        raise util.Abort(_('outstanding uncommitted changes in given files'))
+        raise util.Abort(_('outstanding uncommitted changes'))
     wlock = lock = None
     try:
         wlock = repo.wlock()
@@ -511,7 +513,7 @@
         comparing against working dir.'''
         if node2 is not None:
             kwt.matcher = util.never
-        elif node1 is not None and node1 != repo.changectx().node():
+        elif node1 is not None and node1 != repo.dirstate.parents()[0]:
             kwt.restrict = True
         patch_diff(repo, node1, node2, match, fp, changes, opts)
 
--- a/tests/test-keyword.out	Thu Jun 12 02:33:41 2008 +0200
+++ b/tests/test-keyword.out	Thu Jun 12 02:35:38 2008 +0200
@@ -345,7 +345,7 @@
 % kwexpand a
 overwriting a expanding keywords
 % kwexpand x/a should abort
-abort: outstanding uncommitted changes in given files
+abort: outstanding uncommitted changes
 x/a
  x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
 overwriting x/a expanding keywords