# HG changeset patch # User Christian Ebert # Date 1212765660 -7200 # Node ID dd5eca480af6f2cf168094f0414d3ce9edf7711b # Parent 0804ead55da796a760555c53584136e36dcde332 (0.9.2compat) get some changes from default branch We stay with old-fashioned command _parsing because a _*runcommand method was introduced after 0.9.2 diff -r 0804ead55da7 -r dd5eca480af6 hgkw/keyword.py --- a/hgkw/keyword.py Wed May 14 02:25:52 2008 +0200 +++ b/hgkw/keyword.py Fri Jun 06 17:21:00 2008 +0200 @@ -409,11 +409,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() @@ -689,7 +691,7 @@ # only expand if 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 try: patch_diff(repo, node1, node2, files, match, fp, changes, opts) diff -r 0804ead55da7 -r dd5eca480af6 tests/test-keyword.out --- a/tests/test-keyword.out Wed May 14 02:25:52 2008 +0200 +++ b/tests/test-keyword.out Fri Jun 06 17:21:00 2008 +0200 @@ -270,7 +270,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