Make kwfiles show deleted files configured for expansion
authorChristian Ebert <blacktrash@gmx.net>
Sun, 05 Dec 2010 13:07:28 +0100
changeset 871 c2651cd808b7
parent 870 ef8b368bf24b
child 872 67aaf09289bb
child 873 05e160f8f8bc
Make kwfiles show deleted files configured for expansion
hgkw/keyword.py
--- a/hgkw/keyword.py	Sun Dec 05 13:07:24 2010 +0100
+++ b/hgkw/keyword.py	Sun Dec 05 13:07:28 2010 +0100
@@ -103,6 +103,7 @@
 
 colortable = {
     'kwfiles.enabled': 'green bold',
+    'kwfiles.deleted': 'cyan bold underline',
     'kwfiles.enabledunknown': 'green',
     'kwfiles.ignored': 'bold',
     'kwfiles.ignoredunknown': 'none'
@@ -445,16 +446,17 @@
         files = sorted(modified + added + clean)
     wctx = repo[None]
     kwfiles = kwt.iskwfile(files, wctx)
+    kwdeleted = kwt.iskwfile(deleted, wctx)
     kwunknown = kwt.iskwfile(unknown, wctx)
     if not opts.get('ignore') or opts.get('all'):
-        showfiles = kwfiles, kwunknown
+        showfiles = kwfiles, kwdeleted, kwunknown
     else:
-        showfiles = [], []
+        showfiles = [], [], []
     if opts.get('all') or opts.get('ignore'):
         showfiles += ([f for f in files if f not in kwfiles],
                       [f for f in unknown if f not in kwunknown])
-    kwlabels = 'enabled enabledunknown ignored ignoredunknown'.split()
-    kwstates = zip('KkIi', showfiles, kwlabels)
+    kwlabels = 'enabled deleted enabledunknown ignored ignoredunknown'.split()
+    kwstates = zip('K!kIi', showfiles, kwlabels)
     for char, filenames, kwstate in kwstates:
         fmt = (opts.get('all') or ui.verbose) and '%s %%s\n' % char or '%s\n'
         for f in filenames: