Determine kwfiles on workingctx
authorChristian Ebert <blacktrash@gmx.net>
Sat, 06 Oct 2007 16:07:03 +0200
changeset 258 dab61b56b6b8
parent 257 1090221301cf
child 259 76402fc0fb58
Determine kwfiles on workingctx Added but not yet committed files should be shown. Removed but not yet committed files should not be shown.
hgkw/keyword.py
--- a/hgkw/keyword.py	Fri Oct 05 15:53:28 2007 +0200
+++ b/hgkw/keyword.py	Sat Oct 06 16:07:03 2007 +0200
@@ -372,8 +372,11 @@
     '''
     kwfmatcher = _keywordmatcher(ui, repo)
     if kwfmatcher is not None:
-        ctx = repo.changectx()
-        files = _weedcandidates(ctx.manifest(), kwfmatcher, None)
+        ctx = repo.workingctx()
+        man = ctx.manifest()
+        for f in ctx.unknown():
+            del man[f]
+        files = _weedcandidates(man, kwfmatcher, None)
         files.sort()
         ui.write('\n'.join(files) + '\n')