author | demian@gaudron.lan |
Sat, 13 May 2006 14:36:03 +0200 | |
changeset 2367 | 8c893af1154a |
parent 2366 | f9f53c7e1875 |
child 2368 | eb1ec13e3b0d |
permissions | -rw-r--r-- |
2364 | 1 |
What is "hg purge"? |
2 |
=================== |
|
3 |
"purge" is a simple extension for the Mercurial source control management |
|
4 |
system (http://www.selenic.com/mercurial). |
|
5 |
This extension adds a "purge" command to "hg" that removes files not known |
|
6 |
to mercurial, this is useful to test local and uncommitted changes in the |
|
7 |
otherwise clean source tree. |
|
8 |
||
9 |
This means that Mercurial will delete: |
|
10 |
- Unknown files: files marked with "?" by "hg status" |
|
11 |
- Ignored files: files usually ignored by Mercurial because they match a |
|
12 |
pattern in a ".hgignore" file |
|
13 |
- Empty directories: infact Mercurial ignores directories unless they |
|
14 |
contain files under source control managment |
|
15 |
But it will leave untouched: |
|
16 |
- Unmodified files tracked by Mercurial |
|
17 |
- Modified files tracked by Mercurial |
|
18 |
- New files added to the repository (with "hg add") |
|
19 |
||
20 |
Be careful with "hg purge", you could irreversibly delete some files you |
|
21 |
forgot to add to the repository. If you only want to print the list of |
|
22 |
files that this program would delete use: |
|
23 |
hg purge -vn |
|
24 |
||
2367
8c893af1154a
Added a link to the page for CVS utilities
demian@gaudron.lan
parents:
2366
diff
changeset
|
25 |
"hg purge" was inspired by the "cvspurge" script contained in CVS utilities |
8c893af1154a
Added a link to the page for CVS utilities
demian@gaudron.lan
parents:
2366
diff
changeset
|
26 |
(http://www.red-bean.com/cvsutils/). |
8c893af1154a
Added a link to the page for CVS utilities
demian@gaudron.lan
parents:
2366
diff
changeset
|
27 |
|
2364 | 28 |
|
29 |
How to install |
|
30 |
============== |
|
2366
f9f53c7e1875
Added some lines on the requirements for purge
demian@gaudron.lan
parents:
2365
diff
changeset
|
31 |
Obviously you need an installed version of Mercurial to use this extension. |
f9f53c7e1875
Added some lines on the requirements for purge
demian@gaudron.lan
parents:
2365
diff
changeset
|
32 |
"purge" has been tested with Mercurial 0.8.1 and 0.9 but it may work with |
f9f53c7e1875
Added some lines on the requirements for purge
demian@gaudron.lan
parents:
2365
diff
changeset
|
33 |
other versions as well. |
f9f53c7e1875
Added some lines on the requirements for purge
demian@gaudron.lan
parents:
2365
diff
changeset
|
34 |
|
2365
a5d2e5490ac7
Added an explanation on how to enable the extension in "~/.hgrc"
demian@gaudron.lan
parents:
2364
diff
changeset
|
35 |
Put the "purge.py" file in a directory of your choice. Enable the extension |
a5d2e5490ac7
Added an explanation on how to enable the extension in "~/.hgrc"
demian@gaudron.lan
parents:
2364
diff
changeset
|
36 |
inserting an instruction like "purge=/path/you/choose/purge.py" in the |
a5d2e5490ac7
Added an explanation on how to enable the extension in "~/.hgrc"
demian@gaudron.lan
parents:
2364
diff
changeset
|
37 |
"[extensions]" section of a configuration file read by "hg". |
a5d2e5490ac7
Added an explanation on how to enable the extension in "~/.hgrc"
demian@gaudron.lan
parents:
2364
diff
changeset
|
38 |
|
a5d2e5490ac7
Added an explanation on how to enable the extension in "~/.hgrc"
demian@gaudron.lan
parents:
2364
diff
changeset
|
39 |
For instance if you installed the script in "/home/USER/hg-purge/", you |
a5d2e5490ac7
Added an explanation on how to enable the extension in "~/.hgrc"
demian@gaudron.lan
parents:
2364
diff
changeset
|
40 |
can create a file named ".hgrc" in your home directory with the following |
a5d2e5490ac7
Added an explanation on how to enable the extension in "~/.hgrc"
demian@gaudron.lan
parents:
2364
diff
changeset
|
41 |
content: |
a5d2e5490ac7
Added an explanation on how to enable the extension in "~/.hgrc"
demian@gaudron.lan
parents:
2364
diff
changeset
|
42 |
[extensions] |
a5d2e5490ac7
Added an explanation on how to enable the extension in "~/.hgrc"
demian@gaudron.lan
parents:
2364
diff
changeset
|
43 |
purge=/home/USER/hg-purge/purge.py |
a5d2e5490ac7
Added an explanation on how to enable the extension in "~/.hgrc"
demian@gaudron.lan
parents:
2364
diff
changeset
|
44 |
Note that using "~/USER/hg-purge/purge.py" does not work with hg 0.9. |
a5d2e5490ac7
Added an explanation on how to enable the extension in "~/.hgrc"
demian@gaudron.lan
parents:
2364
diff
changeset
|
45 |
|
a5d2e5490ac7
Added an explanation on how to enable the extension in "~/.hgrc"
demian@gaudron.lan
parents:
2364
diff
changeset
|
46 |
For more information on the configuration files see the man page for "hgrc": |
2364 | 47 |
man 5 hgrc |
48 |
||
49 |
||
50 |
How to use "hg purge" |
|
51 |
==================== |
|
52 |
For help on the usage of "hg purge" use: |
|
53 |
hg help purge |
|
54 |
||
55 |
||
56 |
License |
|
57 |
======= |
|
58 |
Copyright (C) 2006 - Marco Barisione <marco@barisione.org> |
|
59 |
||
60 |
This program is distributed in the hope that it will be useful, |
|
61 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
62 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
63 |
GNU General Public License for more details. |
|
64 |
||
65 |
A copy of the GNU General Public License is distributed along |
|
66 |
with this program in the file COPYING.GPL. |