Merge with crew
authorBrendan Cully <brendan@kublai.com>
Mon, 29 Jun 2009 09:00:37 -0700
changeset 8960 8a5657ecdaaf
parent 8959 970506870efb (current diff)
parent 8958 8358cf63f612 (diff)
child 8961 c963d49ac7a1
Merge with crew
--- a/hgext/keyword.py	Mon Jun 29 09:00:26 2009 -0700
+++ b/hgext/keyword.py	Mon Jun 29 09:00:37 2009 -0700
@@ -359,27 +359,40 @@
     _kwfwrite(ui, repo, True, *pats, **opts)
 
 def files(ui, repo, *pats, **opts):
-    '''print filenames configured for keyword expansion
+    '''show files configured for keyword expansion
 
-    Check which filenames in the working directory are matched by the
+    List which files in the working directory are matched by the
     [keyword] configuration patterns.
 
     Useful to prevent inadvertent keyword expansion and to speed up
-    execution by including only filenames that are actual candidates
+    execution by including only files that are actual candidates
     for expansion.
 
-    Use -u/--untracked to display untracked filenames as well.
+    See "hg help keyword" on how to construct patterns both for
+    inclusion and exclusion of files.
+
+    Use -u/--untracked to list untracked files as well.
+
+    With -a/--all and -v/--verbose the codes used to show the status
+    of files are:
+    K = keyword expansion candidate
+    k = keyword expansion candidate (untracked)
+    I = ignored
+    i = ignored (untracked)
     '''
     kwt = kwtools['templater']
     status = _status(ui, repo, kwt, opts.get('untracked'), *pats, **opts)
     modified, added, removed, deleted, unknown, ignored, clean = status
-    files = sorted(modified + added + clean + unknown)
+    files = sorted(modified + added + clean)
     wctx = repo[None]
     kwfiles = [f for f in files if kwt.iskwfile(f, wctx.flags)]
+    kwuntracked = [f for f in unknown if kwt.iskwfile(f, wctx.flags)]
     cwd = pats and repo.getcwd() or ''
-    kwfstats = not opts.get('ignore') and (('K', kwfiles),) or ()
+    kwfstats = (not opts.get('ignore') and
+                (('K', kwfiles), ('k', kwuntracked),) or ())
     if opts.get('all') or opts.get('ignore'):
-        kwfstats += (('I', [f for f in files if f not in kwfiles]),)
+        kwfstats += (('I', [f for f in files if f not in kwfiles]),
+                     ('i', [f for f in unknown if f not in kwuntracked]),)
     for char, filenames in kwfstats:
         fmt = (opts.get('all') or ui.verbose) and '%s %%s\n' % char or '%s\n'
         for f in filenames:
--- a/mercurial/commands.py	Mon Jun 29 09:00:26 2009 -0700
+++ b/mercurial/commands.py	Mon Jun 29 09:00:37 2009 -0700
@@ -484,8 +484,8 @@
     parameters. To create a bundle containing all changesets, use
     -a/--all (or --base null).
 
-    To change the compression method applied, use the -t/--type
-    option. The available compression methods are: none, bzip2, and
+    You can change compression method with the -t/--type option.
+    The available compression methods are: none, bzip2, and
     gzip (by default, bundles are compressed using bzip2).
 
     The bundle file can then be transferred using conventional means
--- a/tests/test-keyword.out	Mon Jun 29 09:00:26 2009 -0700
+++ b/tests/test-keyword.out	Mon Jun 29 09:00:37 2009 -0700
@@ -50,7 +50,7 @@
 
  kwdemo     print [keywordmaps] configuration and an expansion example
  kwexpand   expand keywords in the working directory
- kwfiles    print filenames configured for keyword expansion
+ kwfiles    show files configured for keyword expansion
  kwshrink   revert expanded keywords in the working directory
 
 enabled extensions: