# HG changeset patch # User Christian Ebert # Date 1213230938 -7200 # Node ID d9aae4cd69be0d825ad900e59d55ed42706582fa # Parent 5e2be38cb3dd274f4018d85450fd625e1a1ce7bc# Parent df56cd11458dc0f0c3a9778750d1ebf77c33b3a0 Merge after backout Revert to dispatch._parse for grabbing current command name. diff -r df56cd11458d -r d9aae4cd69be 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) diff -r df56cd11458d -r d9aae4cd69be tests/test-keyword.out --- 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