Show More
@@ -3,8 +3,8 b'' | |||||
3 | # This is a small extension for Mercurial (http://mercurial.selenic.com/) |
|
3 | # This is a small extension for Mercurial (http://mercurial.selenic.com/) | |
4 | # that removes files not known to mercurial |
|
4 | # that removes files not known to mercurial | |
5 | # |
|
5 | # | |
6 |
# This program was inspired by the "cvspurge" script contained in CVS |
|
6 | # This program was inspired by the "cvspurge" script contained in CVS | |
7 | # (http://www.red-bean.com/cvsutils/). |
|
7 | # utilities (http://www.red-bean.com/cvsutils/). | |
8 | # |
|
8 | # | |
9 | # For help on the usage of "hg purge" use: |
|
9 | # For help on the usage of "hg purge" use: | |
10 | # hg help purge |
|
10 | # hg help purge | |
@@ -32,14 +32,14 b' import os, stat' | |||||
32 | def purge(ui, repo, *dirs, **opts): |
|
32 | def purge(ui, repo, *dirs, **opts): | |
33 | '''removes files not tracked by Mercurial |
|
33 | '''removes files not tracked by Mercurial | |
34 |
|
34 | |||
35 |
Delete files not known to Mercurial. This is useful to test local |
|
35 | Delete files not known to Mercurial. This is useful to test local | |
36 | uncommitted changes in an otherwise-clean source tree. |
|
36 | and uncommitted changes in an otherwise-clean source tree. | |
37 |
|
37 | |||
38 | This means that purge will delete: |
|
38 | This means that purge will delete: | |
39 |
|
39 | |||
40 | - Unknown files: files marked with "?" by "hg status" |
|
40 | - Unknown files: files marked with "?" by "hg status" | |
41 |
- Empty directories: in fact Mercurial ignores directories unless |
|
41 | - Empty directories: in fact Mercurial ignores directories unless | |
42 | contain files under source control management |
|
42 | they contain files under source control management | |
43 |
|
43 | |||
44 | But it will leave untouched: |
|
44 | But it will leave untouched: | |
45 |
|
45 | |||
@@ -50,9 +50,10 b' def purge(ui, repo, *dirs, **opts):' | |||||
50 | If directories are given on the command line, only files in these |
|
50 | If directories are given on the command line, only files in these | |
51 | directories are considered. |
|
51 | directories are considered. | |
52 |
|
52 | |||
53 |
Be careful with purge, as you could irreversibly delete some files |
|
53 | Be careful with purge, as you could irreversibly delete some files | |
54 |
forgot to add to the repository. If you only want to print the |
|
54 | you forgot to add to the repository. If you only want to print the | |
55 |
files that this program would delete, use the --print |
|
55 | list of files that this program would delete, use the --print | |
|
56 | option. | |||
56 | ''' |
|
57 | ''' | |
57 | act = not opts['print'] |
|
58 | act = not opts['print'] | |
58 | eol = '\n' |
|
59 | eol = '\n' |
General Comments 0
You need to be logged in to leave comments.
Login now