Mercurial > hg
annotate tests/test-purge.t @ 48223:b4f83c9e7905
dirstate-v2: Add support when Rust is not enabled
This wires into `dirstatemap` the parser and serializer added in previous
changesets. The memory representation is still the same, with a flat `dict`
for `DirstateItem`s and another one for copy sources. Serialization always
creates a new dirstate-v2 data file and does not support (when Rust is not
enabled) appending to an existing one, since we don’t keep track of which
tree nodes are new or modified. Instead the tree is reconstructed during
serialization.
Differential Revision: https://phab.mercurial-scm.org/D11520
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Fri, 16 Jul 2021 18:42:20 +0200 |
parents | bf8837e3d7ce |
children | 5c567aca080d |
rev | line source |
---|---|
48068
bf8837e3d7ce
dirstate: Remove the flat Rust DirstateMap implementation
Simon Sapin <simon.sapin@octobus.net>
parents:
47281
diff
changeset
|
1 #testcases dirstate-v1 dirstate-v2 |
47129
93eb6c8035a9
dirstate-tree: Add a dirstate-v1-tree variant of some tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46368
diff
changeset
|
2 |
47281
6763913fa175
dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents:
47129
diff
changeset
|
3 #if dirstate-v2 |
6763913fa175
dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents:
47129
diff
changeset
|
4 $ echo '[format]' >> $HGRCPATH |
6763913fa175
dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents:
47129
diff
changeset
|
5 $ echo 'exp-dirstate-v2=1' >> $HGRCPATH |
6763913fa175
dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents:
47129
diff
changeset
|
6 #endif |
6763913fa175
dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents:
47129
diff
changeset
|
7 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
8 init |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
9 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
10 $ hg init t |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
11 $ cd t |
4145
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
12 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
13 setup |
4145
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
14 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
15 $ echo r1 > r1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
16 $ hg ci -qAmr1 -d'0 0' |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
17 $ mkdir directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
18 $ echo r2 > directory/r2 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
19 $ hg ci -qAmr2 -d'1 0' |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
20 $ echo 'ignored' > .hgignore |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
21 $ hg ci -qAmr3 -d'2 0' |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
22 |
46368
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
23 purge without the extension |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
24 |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
25 $ hg st |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
26 $ touch foo |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
27 $ hg purge |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
28 permanently delete 1 unkown files? (yN) n |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
29 abort: removal cancelled |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
30 [250] |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
31 $ hg st |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
32 ? foo |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
33 $ hg purge --no-confirm |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
34 $ hg st |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
35 |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
36 now enabling the extension |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
37 |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
38 $ cat <<EOF >> $HGRCPATH |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
39 > [extensions] |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
40 > purge = |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
41 > EOF |
bb3a5c0df06b
purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
46367
diff
changeset
|
42 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
43 delete an empty directory |
4145
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
44 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
45 $ mkdir empty_dir |
20565
f1c3ba167b0c
purge: avoid duplicate output for --print (issue4092)
anuraggoel <anurag.dsps@gmail.com>
parents:
16930
diff
changeset
|
46 $ hg purge -p -v |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
47 empty_dir |
46367
57370e7deb7b
purge: also deal with directory with --confirm
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46366
diff
changeset
|
48 $ hg purge --confirm |
57370e7deb7b
purge: also deal with directory with --confirm
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46366
diff
changeset
|
49 permanently delete at least 1 empty directories? (yN) n |
57370e7deb7b
purge: also deal with directory with --confirm
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46366
diff
changeset
|
50 abort: removal cancelled |
57370e7deb7b
purge: also deal with directory with --confirm
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46366
diff
changeset
|
51 [250] |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
52 $ hg purge -v |
16930
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
53 removing directory empty_dir |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
54 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
55 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
56 .hgignore |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
57 directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
58 r1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
59 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
60 delete an untracked directory |
4145
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
61 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
62 $ mkdir untracked_dir |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
63 $ touch untracked_dir/untracked_file1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
64 $ touch untracked_dir/untracked_file2 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
65 $ hg purge -p |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
66 untracked_dir/untracked_file1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
67 untracked_dir/untracked_file2 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
68 $ hg purge -v |
16930
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
69 removing file untracked_dir/untracked_file1 |
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
70 removing file untracked_dir/untracked_file2 |
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
71 removing directory untracked_dir |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
72 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
73 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
74 .hgignore |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
75 directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
76 r1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
77 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
78 delete an untracked file |
4145
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
79 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
80 $ touch untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
81 $ touch untracked_file_readonly |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
33262
diff
changeset
|
82 $ "$PYTHON" <<EOF |
40369
ef6cab7930b3
py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents:
39707
diff
changeset
|
83 > import os |
ef6cab7930b3
py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents:
39707
diff
changeset
|
84 > import stat |
41738
c70bdd222dcd
tests: bulk changes to avoid whitespace errors of check-code.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
40369
diff
changeset
|
85 > f = 'untracked_file_readonly' |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
86 > os.chmod(f, stat.S_IMODE(os.stat(f).st_mode) & ~stat.S_IWRITE) |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
87 > EOF |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
88 $ hg purge -p |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
89 untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
90 untracked_file_readonly |
46366
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
91 $ hg purge --confirm |
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
92 permanently delete 2 unkown files? (yN) n |
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
93 abort: removal cancelled |
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
94 [250] |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
95 $ hg purge -v |
16930
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
96 removing file untracked_file |
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
97 removing file untracked_file_readonly |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
98 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
99 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
100 .hgignore |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
101 directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
102 r1 |
4145
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
103 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
104 delete an untracked file in a tracked directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
105 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
106 $ touch directory/untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
107 $ hg purge -p |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
108 directory/untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
109 $ hg purge -v |
16930
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
110 removing file directory/untracked_file |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
111 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
112 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
113 .hgignore |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
114 directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
115 r1 |
4145
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
116 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
117 delete nested directories |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
118 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
119 $ mkdir -p untracked_directory/nested_directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
120 $ hg purge -p |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
121 untracked_directory/nested_directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
122 $ hg purge -v |
16930
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
123 removing directory untracked_directory/nested_directory |
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
124 removing directory untracked_directory |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
125 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
126 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
127 .hgignore |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
128 directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
129 r1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
130 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
131 delete nested directories from a subdir |
4145
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
132 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
133 $ mkdir -p untracked_directory/nested_directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
134 $ cd directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
135 $ hg purge -p |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
136 untracked_directory/nested_directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
137 $ hg purge -v |
16930
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
138 removing directory untracked_directory/nested_directory |
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
139 removing directory untracked_directory |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
140 $ cd .. |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
141 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
142 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
143 .hgignore |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
144 directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
145 r1 |
4145
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
146 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
147 delete only part of the tree |
4155
4c714ed245d6
purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4145
diff
changeset
|
148 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
149 $ mkdir -p untracked_directory/nested_directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
150 $ touch directory/untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
151 $ cd directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
152 $ hg purge -p ../untracked_directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
153 untracked_directory/nested_directory |
46366
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
154 $ hg purge --confirm |
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
155 permanently delete 1 unkown files? (yN) n |
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
156 abort: removal cancelled |
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
157 [250] |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
158 $ hg purge -v ../untracked_directory |
16930
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
159 removing directory untracked_directory/nested_directory |
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
160 removing directory untracked_directory |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
161 $ cd .. |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
162 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
163 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
164 .hgignore |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
165 directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
166 r1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
167 $ ls directory/untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
168 directory/untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
169 $ rm directory/untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
170 |
44289
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
171 skip ignored files if -i or --all not specified |
4155
4c714ed245d6
purge.py: fix invocation of statwalk
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4145
diff
changeset
|
172 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
173 $ touch ignored |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
174 $ hg purge -p |
46366
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
175 $ hg purge --confirm |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
176 $ hg purge -v |
44289
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
177 $ touch untracked_file |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
178 $ ls |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
179 directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
180 ignored |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
181 r1 |
44289
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
182 untracked_file |
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
183 $ hg purge -p -i |
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
184 ignored |
46366
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
185 $ hg purge --confirm -i |
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
186 permanently delete 1 ignored files? (yN) n |
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
187 abort: removal cancelled |
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
188 [250] |
44289
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
189 $ hg purge -v -i |
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
190 removing file ignored |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
191 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
192 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
193 .hgignore |
44289
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
194 directory |
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
195 r1 |
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
196 untracked_file |
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
197 $ touch ignored |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
198 $ hg purge -p --all |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
199 ignored |
44289
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
200 untracked_file |
46366
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
201 $ hg purge --confirm --all |
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
202 permanently delete 1 unkown and 1 ignored files? (yN) n |
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
203 abort: removal cancelled |
135056e8b5a8
purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44724
diff
changeset
|
204 [250] |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
205 $ hg purge -v --all |
16930
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
206 removing file ignored |
44289
9f8eddd2723f
purge: add -i flag to delete ignored files instead of untracked files
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41738
diff
changeset
|
207 removing file untracked_file |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
208 $ ls |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
209 directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
210 r1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
211 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
212 abort with missing files until we support name mangling filesystems |
4310
c8919eb0f315
purge: abort with missing files avoiding problems with name-mangling fs
Emanuele Aina <em@nerd.ocracy.org>
parents:
4155
diff
changeset
|
213 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
214 $ touch untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
215 $ rm r1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
216 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
217 hide error messages to avoid changing the output when the text changes |
6757 | 218 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
219 $ hg purge -p 2> /dev/null |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
220 untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
221 $ hg st |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
222 ! r1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
223 ? untracked_file |
6757 | 224 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
225 $ hg purge -p |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
226 untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
227 $ hg purge -v 2> /dev/null |
16930
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
228 removing file untracked_file |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
229 $ hg st |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
230 ! r1 |
4463
a73cf208b2a0
purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents:
4311
diff
changeset
|
231 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
232 $ hg purge -v |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
233 $ hg revert --all --quiet |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
234 $ hg st -a |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
235 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
236 tracked file in ignored directory (issue621) |
5517
98d5f9b95699
purge: simplify safety net for case mangling filesystems
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4691
diff
changeset
|
237 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
238 $ echo directory >> .hgignore |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
239 $ hg ci -m 'ignore directory' |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
240 $ touch untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
241 $ hg purge -p |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
242 untracked_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
243 $ hg purge -v |
16930
9efe4a95c099
purge: lowercase messages
Martin Geisler <mg@aragost.com>
parents:
16913
diff
changeset
|
244 removing file untracked_file |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
245 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
246 skip excluded files |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
247 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
248 $ touch excluded_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
249 $ hg purge -p -X excluded_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
250 $ hg purge -v -X excluded_file |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
251 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
252 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
253 .hgignore |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
254 directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
255 excluded_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
256 r1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
257 $ rm excluded_file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
258 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
259 skip files in excluded dirs |
4463
a73cf208b2a0
purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents:
4311
diff
changeset
|
260 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
261 $ mkdir excluded_dir |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
262 $ touch excluded_dir/file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
263 $ hg purge -p -X excluded_dir |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
264 $ hg purge -v -X excluded_dir |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
265 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
266 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
267 .hgignore |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
268 directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
269 excluded_dir |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
270 r1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
271 $ ls excluded_dir |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
272 file |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
273 $ rm -R excluded_dir |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
274 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
275 skip excluded empty dirs |
4463
a73cf208b2a0
purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents:
4311
diff
changeset
|
276 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
277 $ mkdir excluded_dir |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
278 $ hg purge -p -X excluded_dir |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
279 $ hg purge -v -X excluded_dir |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
280 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
281 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
282 .hgignore |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
283 directory |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
284 excluded_dir |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
285 r1 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
286 $ rmdir excluded_dir |
4463
a73cf208b2a0
purge: add --include and --exclude options
Emanuele Aina <em@nerd.ocracy.org>
parents:
4311
diff
changeset
|
287 |
12122
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
288 skip patterns |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
289 |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
290 $ mkdir .svn |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
291 $ touch .svn/foo |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
292 $ mkdir directory/.svn |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
293 $ touch directory/.svn/foo |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
294 $ hg purge -p -X .svn -X '*/.svn' |
9bab9ee901e8
tests: unify test-purge
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10119
diff
changeset
|
295 $ hg purge -p -X re:.*.svn |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
12122
diff
changeset
|
296 |
21853
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
297 $ rm -R .svn directory r1 |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
298 |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
299 only remove files |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
300 |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
301 $ mkdir -p empty_dir dir |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
302 $ touch untracked_file dir/untracked_file |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
303 $ hg purge -p --files |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
304 dir/untracked_file |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
305 untracked_file |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
306 $ hg purge -v --files |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
307 removing file dir/untracked_file |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
308 removing file untracked_file |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
309 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
310 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
311 .hgignore |
21853
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
312 dir |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
313 empty_dir |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
314 $ ls dir |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
315 |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
316 only remove dirs |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
317 |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
318 $ mkdir -p empty_dir dir |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
319 $ touch untracked_file dir/untracked_file |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
320 $ hg purge -p --dirs |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
321 empty_dir |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
322 $ hg purge -v --dirs |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
323 removing directory empty_dir |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
324 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
325 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
326 .hgignore |
21853
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
327 dir |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
328 untracked_file |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
329 $ ls dir |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
330 untracked_file |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
331 |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
332 remove both files and dirs |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
333 |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
334 $ mkdir -p empty_dir dir |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
335 $ touch untracked_file dir/untracked_file |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
336 $ hg purge -p --files --dirs |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
337 dir/untracked_file |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
338 untracked_file |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
339 empty_dir |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
340 $ hg purge -v --files --dirs |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
341 removing file dir/untracked_file |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
342 removing file untracked_file |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
343 removing directory empty_dir |
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
344 removing directory dir |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
345 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
346 .hg |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44289
diff
changeset
|
347 .hgignore |
21853
8127b9e798b1
purge: add options for deleting only files or only directories
Ben Kehoe <benk@berkeley.edu>
parents:
20565
diff
changeset
|
348 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
12122
diff
changeset
|
349 $ cd .. |