comparison hgext/purge.py @ 7998:e2c55c4a25e2

purge: word-wrap help texts at 70 characters
author Martin Geisler <mg@daimi.au.dk>
date Sat, 04 Apr 2009 23:18:51 +0200
parents 3e592067515d
children b777dd8f7836
comparison
equal deleted inserted replaced
7997:8eb9f495e150 7998:e2c55c4a25e2
32 import os 32 import os
33 33
34 def purge(ui, repo, *dirs, **opts): 34 def purge(ui, repo, *dirs, **opts):
35 '''removes files not tracked by Mercurial 35 '''removes files not tracked by Mercurial
36 36
37 Delete files not known to Mercurial. This is useful to test local and 37 Delete files not known to Mercurial. This is useful to test local
38 uncommitted changes in an otherwise-clean source tree. 38 and uncommitted changes in an otherwise-clean source tree.
39 39
40 This means that purge will delete: 40 This means that purge will delete:
41 - Unknown files: files marked with "?" by "hg status" 41 - Unknown files: files marked with "?" by "hg status"
42 - Empty directories: in fact Mercurial ignores directories unless they 42 - Empty directories: in fact Mercurial ignores directories unless
43 contain files under source control managment 43 they contain files under source control managment
44 But it will leave untouched: 44 But it will leave untouched:
45 - Modified and unmodified tracked files 45 - Modified and unmodified tracked files
46 - Ignored files (unless --all is specified) 46 - Ignored files (unless --all is specified)
47 - New files added to the repository (with "hg add") 47 - New files added to the repository (with "hg add")
48 48
49 If directories are given on the command line, only files in these 49 If directories are given on the command line, only files in these
50 directories are considered. 50 directories are considered.
51 51
52 Be careful with purge, as you could irreversibly delete some files you 52 Be careful with purge, as you could irreversibly delete some files
53 forgot to add to the repository. If you only want to print the list of 53 you forgot to add to the repository. If you only want to print the
54 files that this program would delete, use the --print option. 54 list of files that this program would delete, use the --print
55 option.
55 ''' 56 '''
56 act = not opts['print'] 57 act = not opts['print']
57 eol = '\n' 58 eol = '\n'
58 if opts['print0']: 59 if opts['print0']:
59 eol = '\0' 60 eol = '\0'