diff hgext/keyword.py @ 12684:8348599c68d7

keyword: fix weeding of expansion candidates when recording Rearrange tests to check this, i.e. that there are changes in other files, not only the recorded one.
author Christian Ebert <blacktrash@gmx.net>
date Sun, 10 Oct 2010 00:30:09 +0100
parents 7b34fdffed65
children a247751652ba
line wrap: on
line diff
--- a/hgext/keyword.py	Sun Oct 10 09:48:37 2010 -0500
+++ b/hgext/keyword.py	Sun Oct 10 00:30:09 2010 +0100
@@ -574,8 +574,9 @@
             ret = orig(ui, repo, commitfunc, *pats, **opts)
             recctx = repo['.']
             if ctx != recctx:
-                modified = [f for f in modified if f in recctx]
-                added = [f for f in added if f in recctx]
+                changed = recctx.files()
+                modified = [f for f in modified if f in changed]
+                added = [f for f in added if f in changed]
                 kwt.restrict = False
                 kwt.overwrite(recctx, modified, False, True, kwt.re_kwexp.subn)
                 kwt.overwrite(recctx, added, False, True, kwt.re_kw.subn)