Mercurial > hg
annotate tests/test-remove.t @ 14889:a59058fd074a stable
hooks: redirect stdout/err/in to the ui descriptors when calling python hooks
We need to make sure that python hooks I/O goes through the ui descriptors so
it doesn't mess the command server protocol.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Sat, 09 Jul 2011 19:06:59 +0300 |
parents | 22f3353bcc36 |
children | c84b3f42d5ae |
rev | line source |
---|---|
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
1 $ remove() { |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
2 > hg rm $@ |
12365
22f3353bcc36
tests: cleanup exit code handling in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12130
diff
changeset
|
3 > echo "exit code: $?" # no-check-code |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
4 > hg st |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
5 > # do not use ls -R, which recurses in .hg subdirs on Mac OS X 10.5 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
6 > find . -name .hg -prune -o -type f -print | sort |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
7 > hg up -C |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
8 > } |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
9 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
10 $ hg init a |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
11 $ cd a |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
12 $ echo a > foo |
936 | 13 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
14 file not managed |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
15 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
16 $ remove foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
17 not removing foo: file is untracked |
12130 | 18 exit code: 1 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
19 ? foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
20 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
21 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
22 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
23 $ hg add foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
24 $ hg commit -m1 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
25 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
26 the table cases |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
27 00 state added, options none |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
28 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
29 $ echo b > bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
30 $ hg add bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
31 $ remove bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
32 not removing bar: file has been marked for add (use -f to force removal) |
12130 | 33 exit code: 1 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
34 A bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
35 ./bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
36 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
37 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
38 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
39 01 state clean, options none |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
40 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
41 $ remove foo |
12130 | 42 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
43 R foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
44 ? bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
45 ./bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
46 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
47 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
48 02 state modified, options none |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
49 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
50 $ echo b >> foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
51 $ remove foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
52 not removing foo: file is modified (use -f to force removal) |
12130 | 53 exit code: 1 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
54 M foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
55 ? bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
56 ./bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
57 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
58 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
59 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
60 03 state missing, options none |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
61 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
62 $ rm foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
63 $ remove foo |
12130 | 64 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
65 R foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
66 ? bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
67 ./bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
68 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
69 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
70 10 state added, options -f |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
71 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
72 $ echo b > bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
73 $ hg add bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
74 $ remove -f bar |
12130 | 75 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
76 ? bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
77 ./bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
78 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
79 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
80 $ rm bar |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
81 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
82 11 state clean, options -f |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
83 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
84 $ remove -f foo |
12130 | 85 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
86 R foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
87 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
88 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
89 12 state modified, options -f |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
90 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
91 $ echo b >> foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
92 $ remove -f foo |
12130 | 93 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
94 R foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
95 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
96 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
97 13 state missing, options -f |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
98 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
99 $ rm foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
100 $ remove -f foo |
12130 | 101 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
102 R foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
103 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
104 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
105 20 state added, options -A |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
106 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
107 $ echo b > bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
108 $ hg add bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
109 $ remove -A bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
110 not removing bar: file still exists (use -f to force removal) |
12130 | 111 exit code: 1 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
112 A bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
113 ./bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
114 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
115 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
116 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
117 21 state clean, options -A |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
118 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
119 $ remove -A foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
120 not removing foo: file still exists (use -f to force removal) |
12130 | 121 exit code: 1 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
122 ? bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
123 ./bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
124 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
125 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
126 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
127 22 state modified, options -A |
936 | 128 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
129 $ echo b >> foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
130 $ remove -A foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
131 not removing foo: file still exists (use -f to force removal) |
12130 | 132 exit code: 1 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
133 M foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
134 ? bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
135 ./bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
136 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
137 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
138 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
139 23 state missing, options -A |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
140 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
141 $ rm foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
142 $ remove -A foo |
12130 | 143 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
144 R foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
145 ? bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
146 ./bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
147 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
148 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
149 30 state added, options -Af |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
150 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
151 $ echo b > bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
152 $ hg add bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
153 $ remove -Af bar |
12130 | 154 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
155 ? bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
156 ./bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
157 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
158 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
159 $ rm bar |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
160 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
161 31 state clean, options -Af |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
162 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
163 $ remove -Af foo |
12130 | 164 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
165 R foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
166 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
167 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
168 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
169 32 state modified, options -Af |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
170 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
171 $ echo b >> foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
172 $ remove -Af foo |
12130 | 173 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
174 R foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
175 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
176 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
2309
b2f37c7026ca
remove: rewrite to be ~400x faster, bit more friendly
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2180
diff
changeset
|
177 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
178 33 state missing, options -Af |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
179 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
180 $ rm foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
181 $ remove -Af foo |
12130 | 182 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
183 R foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
184 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
185 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
186 test some directory stuff |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
187 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
188 $ mkdir test |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
189 $ echo a > test/foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
190 $ echo b > test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
191 $ hg ci -Am2 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
192 adding test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
193 adding test/foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
194 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
195 dir, options none |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
196 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
197 $ rm test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
198 $ remove test |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
199 removing test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
200 removing test/foo |
12130 | 201 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
202 R test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
203 R test/foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
204 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
205 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
206 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
207 dir, options -f |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
208 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
209 $ rm test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
210 $ remove -f test |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
211 removing test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
212 removing test/foo |
12130 | 213 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
214 R test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
215 R test/foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
216 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
217 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
218 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
219 dir, options -A |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
220 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
221 $ rm test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
222 $ remove -A test |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
223 not removing test/foo: file still exists (use -f to force removal) |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
224 removing test/bar |
12130 | 225 exit code: 1 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
226 R test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
227 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
228 ./test/foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
229 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6346
8e3b651382f5
improved semantics for remove (issue438)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
4394
diff
changeset
|
230 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
231 dir, options -Af |
9572
1f665246dab3
windows: fix unlink() not dropping empty tree (issue1861)
Patrick Mezard <pmezard@gmail.com>
parents:
6358
diff
changeset
|
232 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
233 $ rm test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
234 $ remove -Af test |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
235 removing test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
236 removing test/foo |
12130 | 237 exit code: 0 |
12099
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
238 R test/bar |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
239 R test/foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
240 ./foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
241 ./test/foo |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
242 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
243 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
244 test remove dropping empty trees (issue1861) |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
245 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
246 $ mkdir -p issue1861/b/c |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
247 $ echo x > issue1861/x |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
248 $ echo y > issue1861/b/c/y |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
249 $ hg ci -Am add |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
250 adding issue1861/b/c/y |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
251 adding issue1861/x |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
252 $ hg rm issue1861/b |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
253 removing issue1861/b/c/y |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
254 $ hg ci -m remove |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
255 $ ls issue1861 |
54c9549ccb22
tests: unify test-remove
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9572
diff
changeset
|
256 x |