[PATCH] purge: clarify behavior with regard to ignored files

Benjamin Pollack benjamin at bitquabit.com
Mon Jan 5 12:02:21 CST 2009


1 file changed, 7 insertions(+), 9 deletions(-)
hgext/purge.py |   16 +++++++---------


# HG changeset patch
# User Benjamin Pollack <benjamin at bitquabit.com>
# Date 1231177700 18000
# Node ID 5eb08b043cd930e08cac92af399c0857b0d5cc80
# Parent  016a7319e76ba15474a89199657c5aa39bd3b339
purge: clarify behavior with regard to ignored files

The purge documentation previously said that purge would delete ignored
files.  This is only true if purge is passed the --all option, which is
now stated explicitly.  A few trivial grammar errors were also fixed.

diff -r 016a7319e76b -r 5eb08b043cd9 hgext/purge.py
--- a/hgext/purge.py	Wed Dec 31 18:00:35 2008 -0600
+++ b/hgext/purge.py	Mon Jan 05 12:48:20 2009 -0500
@@ -32,28 +32,26 @@
 import os
 
 def purge(ui, repo, *dirs, **opts):
-    '''removes files not tracked by mercurial
+    '''removes files not tracked by Mercurial
 
-    Delete files not known to mercurial, this is useful to test local and
-    uncommitted changes in the otherwise clean source tree.
+    Delete files not known to Mercurial. This is useful to test local and
+    uncommitted changes in an otherwise-clean source tree.
 
     This means that purge will delete:
      - Unknown files: files marked with "?" by "hg status"
-     - Ignored files: files usually ignored by Mercurial because they match
-       a pattern in a ".hgignore" file
      - Empty directories: in fact Mercurial ignores directories unless they
        contain files under source control managment
     But it will leave untouched:
-     - Unmodified tracked files
-     - Modified tracked files
+     - Modified and unmodified tracked files
+     - Ignored files (unless --all is specified)
      - New files added to the repository (with "hg add")
 
     If directories are given on the command line, only files in these
     directories are considered.
 
-    Be careful with purge, you could irreversibly delete some files you
+    Be careful with purge, as you could irreversibly delete some files you
     forgot to add to the repository. If you only want to print the list of
-    files that this program would delete use the --print option.
+    files that this program would delete, use the --print option.
     '''
     act = not opts['print']
     eol = '\n'


More information about the Mercurial-devel mailing list