##// END OF EJS Templates
tests: include progress for test-remove
timeless -
r28606:8cc51c5a default
parent child Browse files
Show More
@@ -1,287 +1,350 b''
1 $ remove() {
1 $ remove() {
2 > hg rm $@
2 > hg rm $@
3 > echo "exit code: $?"
3 > echo "exit code: $?"
4 > hg st
4 > hg st
5 > # do not use ls -R, which recurses in .hg subdirs on Mac OS X 10.5
5 > # do not use ls -R, which recurses in .hg subdirs on Mac OS X 10.5
6 > find . -name .hg -prune -o -type f -print | sort
6 > find . -name .hg -prune -o -type f -print | sort
7 > hg up -C
7 > hg up -C
8 > }
8 > }
9
9
10 $ cat >> $HGRCPATH <<EOF
11 > [progress]
12 > disable=False
13 > assume-tty = 1
14 > delay = 0
15 > # set changedelay really large so we don't see nested topics
16 > changedelay = 30000
17 > format = topic bar number
18 > refresh = 0
19 > width = 60
20 > EOF
21
10 $ hg init a
22 $ hg init a
11 $ cd a
23 $ cd a
12 $ echo a > foo
24 $ echo a > foo
13
25
14 file not managed
26 file not managed
15
27
16 $ remove foo
28 $ remove foo
17 not removing foo: file is untracked
29 not removing foo: file is untracked
18 exit code: 1
30 exit code: 1
19 ? foo
31 ? foo
20 ./foo
32 ./foo
21 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
22
34
23 $ hg add foo
35 $ hg add foo
24 $ hg commit -m1
36 $ hg commit -m1
25
37
26 the table cases
38 the table cases
27 00 state added, options none
39 00 state added, options none
28
40
29 $ echo b > bar
41 $ echo b > bar
30 $ hg add bar
42 $ hg add bar
31 $ remove bar
43 $ remove bar
32 not removing bar: file has been marked for add (use forget to undo)
44 not removing bar: file has been marked for add (use forget to undo)
33 exit code: 1
45 exit code: 1
34 A bar
46 A bar
35 ./bar
47 ./bar
36 ./foo
48 ./foo
49 \r (no-eol) (esc)
50 updating [===========================================>] 1/1\r (no-eol) (esc)
51 \r (no-eol) (esc)
37 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
52 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
38
53
39 01 state clean, options none
54 01 state clean, options none
40
55
41 $ remove foo
56 $ remove foo
42 exit code: 0
57 exit code: 0
43 R foo
58 R foo
44 ? bar
59 ? bar
45 ./bar
60 ./bar
61 \r (no-eol) (esc)
62 updating [===========================================>] 1/1\r (no-eol) (esc)
63 \r (no-eol) (esc)
46 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
64 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
47
65
48 02 state modified, options none
66 02 state modified, options none
49
67
50 $ echo b >> foo
68 $ echo b >> foo
51 $ remove foo
69 $ remove foo
52 not removing foo: file is modified (use -f to force removal)
70 not removing foo: file is modified (use -f to force removal)
53 exit code: 1
71 exit code: 1
54 M foo
72 M foo
55 ? bar
73 ? bar
56 ./bar
74 ./bar
57 ./foo
75 ./foo
76 \r (no-eol) (esc)
77 updating [===========================================>] 1/1\r (no-eol) (esc)
78 \r (no-eol) (esc)
58 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
79 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
59
80
60 03 state missing, options none
81 03 state missing, options none
61
82
62 $ rm foo
83 $ rm foo
63 $ remove foo
84 $ remove foo
64 exit code: 0
85 exit code: 0
65 R foo
86 R foo
66 ? bar
87 ? bar
67 ./bar
88 ./bar
89 \r (no-eol) (esc)
90 updating [===========================================>] 1/1\r (no-eol) (esc)
91 \r (no-eol) (esc)
68 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
92 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69
93
70 10 state added, options -f
94 10 state added, options -f
71
95
72 $ echo b > bar
96 $ echo b > bar
73 $ hg add bar
97 $ hg add bar
74 $ remove -f bar
98 $ remove -f bar
75 exit code: 0
99 exit code: 0
76 ? bar
100 ? bar
77 ./bar
101 ./bar
78 ./foo
102 ./foo
79 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
103 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
80 $ rm bar
104 $ rm bar
81
105
82 11 state clean, options -f
106 11 state clean, options -f
83
107
84 $ remove -f foo
108 $ remove -f foo
85 exit code: 0
109 exit code: 0
86 R foo
110 R foo
111 \r (no-eol) (esc)
112 updating [===========================================>] 1/1\r (no-eol) (esc)
113 \r (no-eol) (esc)
87 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
114 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
88
115
89 12 state modified, options -f
116 12 state modified, options -f
90
117
91 $ echo b >> foo
118 $ echo b >> foo
92 $ remove -f foo
119 $ remove -f foo
93 exit code: 0
120 exit code: 0
94 R foo
121 R foo
122 \r (no-eol) (esc)
123 updating [===========================================>] 1/1\r (no-eol) (esc)
124 \r (no-eol) (esc)
95 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
125 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
96
126
97 13 state missing, options -f
127 13 state missing, options -f
98
128
99 $ rm foo
129 $ rm foo
100 $ remove -f foo
130 $ remove -f foo
101 exit code: 0
131 exit code: 0
102 R foo
132 R foo
133 \r (no-eol) (esc)
134 updating [===========================================>] 1/1\r (no-eol) (esc)
135 \r (no-eol) (esc)
103 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
136 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
104
137
105 20 state added, options -A
138 20 state added, options -A
106
139
107 $ echo b > bar
140 $ echo b > bar
108 $ hg add bar
141 $ hg add bar
109 $ remove -A bar
142 $ remove -A bar
110 not removing bar: file still exists
143 not removing bar: file still exists
111 exit code: 1
144 exit code: 1
112 A bar
145 A bar
113 ./bar
146 ./bar
114 ./foo
147 ./foo
148 \r (no-eol) (esc)
149 updating [===========================================>] 1/1\r (no-eol) (esc)
150 \r (no-eol) (esc)
115 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
151 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
116
152
117 21 state clean, options -A
153 21 state clean, options -A
118
154
119 $ remove -A foo
155 $ remove -A foo
120 not removing foo: file still exists
156 not removing foo: file still exists
121 exit code: 1
157 exit code: 1
122 ? bar
158 ? bar
123 ./bar
159 ./bar
124 ./foo
160 ./foo
125 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
161 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
126
162
127 22 state modified, options -A
163 22 state modified, options -A
128
164
129 $ echo b >> foo
165 $ echo b >> foo
130 $ remove -A foo
166 $ remove -A foo
131 not removing foo: file still exists
167 not removing foo: file still exists
132 exit code: 1
168 exit code: 1
133 M foo
169 M foo
134 ? bar
170 ? bar
135 ./bar
171 ./bar
136 ./foo
172 ./foo
173 \r (no-eol) (esc)
174 updating [===========================================>] 1/1\r (no-eol) (esc)
175 \r (no-eol) (esc)
137 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
176 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
138
177
139 23 state missing, options -A
178 23 state missing, options -A
140
179
141 $ rm foo
180 $ rm foo
142 $ remove -A foo
181 $ remove -A foo
143 exit code: 0
182 exit code: 0
144 R foo
183 R foo
145 ? bar
184 ? bar
146 ./bar
185 ./bar
186 \r (no-eol) (esc)
187 updating [===========================================>] 1/1\r (no-eol) (esc)
188 \r (no-eol) (esc)
147 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
189 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
148
190
149 30 state added, options -Af
191 30 state added, options -Af
150
192
151 $ echo b > bar
193 $ echo b > bar
152 $ hg add bar
194 $ hg add bar
153 $ remove -Af bar
195 $ remove -Af bar
154 exit code: 0
196 exit code: 0
155 ? bar
197 ? bar
156 ./bar
198 ./bar
157 ./foo
199 ./foo
158 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
200 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
159 $ rm bar
201 $ rm bar
160
202
161 31 state clean, options -Af
203 31 state clean, options -Af
162
204
163 $ remove -Af foo
205 $ remove -Af foo
164 exit code: 0
206 exit code: 0
165 R foo
207 R foo
166 ./foo
208 ./foo
209 \r (no-eol) (esc)
210 updating [===========================================>] 1/1\r (no-eol) (esc)
211 \r (no-eol) (esc)
167 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
212 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
168
213
169 32 state modified, options -Af
214 32 state modified, options -Af
170
215
171 $ echo b >> foo
216 $ echo b >> foo
172 $ remove -Af foo
217 $ remove -Af foo
173 exit code: 0
218 exit code: 0
174 R foo
219 R foo
175 ./foo
220 ./foo
221 \r (no-eol) (esc)
222 updating [===========================================>] 1/1\r (no-eol) (esc)
223 \r (no-eol) (esc)
176 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
224 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
177
225
178 33 state missing, options -Af
226 33 state missing, options -Af
179
227
180 $ rm foo
228 $ rm foo
181 $ remove -Af foo
229 $ remove -Af foo
182 exit code: 0
230 exit code: 0
183 R foo
231 R foo
232 \r (no-eol) (esc)
233 updating [===========================================>] 1/1\r (no-eol) (esc)
234 \r (no-eol) (esc)
184 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
235 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
185
236
186 test some directory stuff
237 test some directory stuff
187
238
188 $ mkdir test
239 $ mkdir test
189 $ echo a > test/foo
240 $ echo a > test/foo
190 $ echo b > test/bar
241 $ echo b > test/bar
191 $ hg ci -Am2
242 $ hg ci -Am2
192 adding test/bar
243 adding test/bar
193 adding test/foo
244 adding test/foo
194
245
195 dir, options none
246 dir, options none
196
247
197 $ rm test/bar
248 $ rm test/bar
198 $ remove test
249 $ remove test
199 removing test/bar (glob)
250 removing test/bar (glob)
200 removing test/foo (glob)
251 removing test/foo (glob)
201 exit code: 0
252 exit code: 0
202 R test/bar
253 R test/bar
203 R test/foo
254 R test/foo
204 ./foo
255 ./foo
256 \r (no-eol) (esc)
257 updating [===========================================>] 2/2\r (no-eol) (esc)
258 \r (no-eol) (esc)
205 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
259 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
206
260
207 dir, options -f
261 dir, options -f
208
262
209 $ rm test/bar
263 $ rm test/bar
210 $ remove -f test
264 $ remove -f test
211 removing test/bar (glob)
265 removing test/bar (glob)
212 removing test/foo (glob)
266 removing test/foo (glob)
213 exit code: 0
267 exit code: 0
214 R test/bar
268 R test/bar
215 R test/foo
269 R test/foo
216 ./foo
270 ./foo
271 \r (no-eol) (esc)
272 updating [===========================================>] 2/2\r (no-eol) (esc)
273 \r (no-eol) (esc)
217 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
274 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
218
275
219 dir, options -A
276 dir, options -A
220
277
221 $ rm test/bar
278 $ rm test/bar
222 $ remove -A test
279 $ remove -A test
223 not removing test/foo: file still exists (glob)
280 not removing test/foo: file still exists (glob)
224 removing test/bar (glob)
281 removing test/bar (glob)
225 exit code: 1
282 exit code: 1
226 R test/bar
283 R test/bar
227 ./foo
284 ./foo
228 ./test/foo
285 ./test/foo
286 \r (no-eol) (esc)
287 updating [===========================================>] 1/1\r (no-eol) (esc)
288 \r (no-eol) (esc)
229 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
289 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
230
290
231 dir, options -Af
291 dir, options -Af
232
292
233 $ rm test/bar
293 $ rm test/bar
234 $ remove -Af test
294 $ remove -Af test
235 removing test/bar (glob)
295 removing test/bar (glob)
236 removing test/foo (glob)
296 removing test/foo (glob)
237 exit code: 0
297 exit code: 0
238 R test/bar
298 R test/bar
239 R test/foo
299 R test/foo
240 ./foo
300 ./foo
241 ./test/foo
301 ./test/foo
302 \r (no-eol) (esc)
303 updating [===========================================>] 2/2\r (no-eol) (esc)
304 \r (no-eol) (esc)
242 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
305 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
243
306
244 test remove dropping empty trees (issue1861)
307 test remove dropping empty trees (issue1861)
245
308
246 $ mkdir -p issue1861/b/c
309 $ mkdir -p issue1861/b/c
247 $ echo x > issue1861/x
310 $ echo x > issue1861/x
248 $ echo y > issue1861/b/c/y
311 $ echo y > issue1861/b/c/y
249 $ hg ci -Am add
312 $ hg ci -Am add
250 adding issue1861/b/c/y
313 adding issue1861/b/c/y
251 adding issue1861/x
314 adding issue1861/x
252 $ hg rm issue1861/b
315 $ hg rm issue1861/b
253 removing issue1861/b/c/y (glob)
316 removing issue1861/b/c/y (glob)
254 $ hg ci -m remove
317 $ hg ci -m remove
255 $ ls issue1861
318 $ ls issue1861
256 x
319 x
257
320
258 test that commit does not crash if the user removes a newly added file
321 test that commit does not crash if the user removes a newly added file
259
322
260 $ touch f1
323 $ touch f1
261 $ hg add f1
324 $ hg add f1
262 $ rm f1
325 $ rm f1
263 $ hg ci -A -mx
326 $ hg ci -A -mx
264 removing f1
327 removing f1
265 nothing changed
328 nothing changed
266 [1]
329 [1]
267
330
268 handling of untracked directories and missing files
331 handling of untracked directories and missing files
269
332
270 $ mkdir d1
333 $ mkdir d1
271 $ echo a > d1/a
334 $ echo a > d1/a
272 $ hg rm --after d1
335 $ hg rm --after d1
273 not removing d1: no tracked files
336 not removing d1: no tracked files
274 [1]
337 [1]
275 $ hg add d1/a
338 $ hg add d1/a
276 $ rm d1/a
339 $ rm d1/a
277 $ hg rm --after d1
340 $ hg rm --after d1
278 removing d1/a (glob)
341 removing d1/a (glob)
279 #if windows
342 #if windows
280 $ hg rm --after nosuch
343 $ hg rm --after nosuch
281 nosuch: * (glob)
344 nosuch: * (glob)
282 [1]
345 [1]
283 #else
346 #else
284 $ hg rm --after nosuch
347 $ hg rm --after nosuch
285 nosuch: No such file or directory
348 nosuch: No such file or directory
286 [1]
349 [1]
287 #endif
350 #endif
@@ -1,816 +1,1052 b''
1 $ cat >> $HGRCPATH <<EOF
1 $ cat >> $HGRCPATH <<EOF
2 > [extdiff]
2 > [extdiff]
3 > # for portability:
3 > # for portability:
4 > pdiff = sh "$RUNTESTDIR/pdiff"
4 > pdiff = sh "$RUNTESTDIR/pdiff"
5 > [progress]
6 > disable=False
7 > assume-tty = 1
8 > delay = 0
9 > # set changedelay really large so we don't see nested topics
10 > changedelay = 30000
11 > format = topic bar number
12 > refresh = 0
13 > width = 60
5 > EOF
14 > EOF
6
15
7 Preparing the subrepository 'sub2'
16 Preparing the subrepository 'sub2'
8
17
9 $ hg init sub2
18 $ hg init sub2
10 $ echo sub2 > sub2/sub2
19 $ echo sub2 > sub2/sub2
11 $ hg add -R sub2
20 $ hg add -R sub2
12 adding sub2/sub2 (glob)
21 adding sub2/sub2 (glob)
13 $ hg commit -R sub2 -m "sub2 import"
22 $ hg commit -R sub2 -m "sub2 import"
14
23
15 Preparing the 'sub1' repo which depends on the subrepo 'sub2'
24 Preparing the 'sub1' repo which depends on the subrepo 'sub2'
16
25
17 $ hg init sub1
26 $ hg init sub1
18 $ echo sub1 > sub1/sub1
27 $ echo sub1 > sub1/sub1
19 $ echo "sub2 = ../sub2" > sub1/.hgsub
28 $ echo "sub2 = ../sub2" > sub1/.hgsub
20 $ hg clone sub2 sub1/sub2
29 $ hg clone sub2 sub1/sub2
30 \r (no-eol) (esc)
31 linking [ <=> ] 1\r (no-eol) (esc)
32 linking [ <=> ] 2\r (no-eol) (esc)
33 linking [ <=> ] 3\r (no-eol) (esc)
34 linking [ <=> ] 4\r (no-eol) (esc)
35 linking [ <=> ] 5\r (no-eol) (esc)
36 linking [ <=> ] 6\r (no-eol) (esc)
37 \r (no-eol) (esc)
38 \r (no-eol) (esc)
39 updating [===========================================>] 1/1\r (no-eol) (esc)
40 \r (no-eol) (esc)
21 updating to branch default
41 updating to branch default
22 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
23 $ hg add -R sub1
43 $ hg add -R sub1
24 adding sub1/.hgsub (glob)
44 adding sub1/.hgsub (glob)
25 adding sub1/sub1 (glob)
45 adding sub1/sub1 (glob)
26 $ hg commit -R sub1 -m "sub1 import"
46 $ hg commit -R sub1 -m "sub1 import"
27
47
28 Preparing the 'main' repo which depends on the subrepo 'sub1'
48 Preparing the 'main' repo which depends on the subrepo 'sub1'
29
49
30 $ hg init main
50 $ hg init main
31 $ echo main > main/main
51 $ echo main > main/main
32 $ echo "sub1 = ../sub1" > main/.hgsub
52 $ echo "sub1 = ../sub1" > main/.hgsub
33 $ hg clone sub1 main/sub1
53 $ hg clone sub1 main/sub1
54 \r (no-eol) (esc)
55 linking [ <=> ] 1\r (no-eol) (esc)
56 linking [ <=> ] 2\r (no-eol) (esc)
57 linking [ <=> ] 3\r (no-eol) (esc)
58 linking [ <=> ] 4\r (no-eol) (esc)
59 linking [ <=> ] 5\r (no-eol) (esc)
60 linking [ <=> ] 6\r (no-eol) (esc)
61 linking [ <=> ] 7\r (no-eol) (esc)
62 linking [ <=> ] 8\r (no-eol) (esc)
63 \r (no-eol) (esc)
64 \r (no-eol) (esc)
65 updating [===========================================>] 3/3\r (no-eol) (esc)
66 updating [===========================================>] 1/1\r (no-eol) (esc)
67 \r (no-eol) (esc)
34 updating to branch default
68 updating to branch default
35 cloning subrepo sub2 from $TESTTMP/sub2
69 cloning subrepo sub2 from $TESTTMP/sub2
36 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
70 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 $ hg add -R main
71 $ hg add -R main
38 adding main/.hgsub (glob)
72 adding main/.hgsub (glob)
39 adding main/main (glob)
73 adding main/main (glob)
40 $ hg commit -R main -m "main import"
74 $ hg commit -R main -m "main import"
41
75
42 Cleaning both repositories, just as a clone -U
76 Cleaning both repositories, just as a clone -U
43
77
44 $ hg up -C -R sub2 null
78 $ hg up -C -R sub2 null
79 \r (no-eol) (esc)
80 updating [===========================================>] 1/1\r (no-eol) (esc)
81 \r (no-eol) (esc)
45 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
82 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
46 $ hg up -C -R sub1 null
83 $ hg up -C -R sub1 null
84 \r (no-eol) (esc)
85 updating [===========================================>] 1/1\r (no-eol) (esc)
86 \r (no-eol) (esc)
87 \r (no-eol) (esc)
88 updating [===========================================>] 3/3\r (no-eol) (esc)
89 \r (no-eol) (esc)
47 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
90 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
48 $ hg up -C -R main null
91 $ hg up -C -R main null
92 \r (no-eol) (esc)
93 updating [===========================================>] 1/1\r (no-eol) (esc)
94 \r (no-eol) (esc)
95 \r (no-eol) (esc)
96 updating [===========================================>] 3/3\r (no-eol) (esc)
97 \r (no-eol) (esc)
98 \r (no-eol) (esc)
99 updating [===========================================>] 3/3\r (no-eol) (esc)
100 \r (no-eol) (esc)
49 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
101 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
50 $ rm -rf main/sub1
102 $ rm -rf main/sub1
51 $ rm -rf sub1/sub2
103 $ rm -rf sub1/sub2
52
104
53 Clone main
105 Clone main
54
106
55 $ hg --config extensions.largefiles= clone main cloned
107 $ hg --config extensions.largefiles= clone main cloned
108 \r (no-eol) (esc)
109 linking [ <=> ] 1\r (no-eol) (esc)
110 linking [ <=> ] 2\r (no-eol) (esc)
111 linking [ <=> ] 3\r (no-eol) (esc)
112 linking [ <=> ] 4\r (no-eol) (esc)
113 linking [ <=> ] 5\r (no-eol) (esc)
114 linking [ <=> ] 6\r (no-eol) (esc)
115 linking [ <=> ] 7\r (no-eol) (esc)
116 linking [ <=> ] 8\r (no-eol) (esc)
117 \r (no-eol) (esc)
118 \r (no-eol) (esc)
119 updating [===========================================>] 3/3\r (no-eol) (esc)
120 updating [===========================================>] 3/3\r (no-eol) (esc)
121 updating [===========================================>] 1/1\r (no-eol) (esc)
122 \r (no-eol) (esc)
56 updating to branch default
123 updating to branch default
57 cloning subrepo sub1 from $TESTTMP/sub1
124 cloning subrepo sub1 from $TESTTMP/sub1
58 cloning subrepo sub1/sub2 from $TESTTMP/sub2 (glob)
125 cloning subrepo sub1/sub2 from $TESTTMP/sub2 (glob)
59 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
126 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
60
127
61 Largefiles is NOT enabled in the clone if the source repo doesn't require it
128 Largefiles is NOT enabled in the clone if the source repo doesn't require it
62 $ cat cloned/.hg/hgrc
129 $ cat cloned/.hg/hgrc
63 # example repository config (see "hg help config" for more info)
130 # example repository config (see "hg help config" for more info)
64 [paths]
131 [paths]
65 default = $TESTTMP/main (glob)
132 default = $TESTTMP/main (glob)
66
133
67 # path aliases to other clones of this repo in URLs or filesystem paths
134 # path aliases to other clones of this repo in URLs or filesystem paths
68 # (see "hg help config.paths" for more info)
135 # (see "hg help config.paths" for more info)
69 #
136 #
70 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
137 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
71 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
138 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
72 # my-clone = /home/jdoe/jdoes-clone
139 # my-clone = /home/jdoe/jdoes-clone
73
140
74 [ui]
141 [ui]
75 # name and email (local to this repository, optional), e.g.
142 # name and email (local to this repository, optional), e.g.
76 # username = Jane Doe <jdoe@example.com>
143 # username = Jane Doe <jdoe@example.com>
77
144
78 Checking cloned repo ids
145 Checking cloned repo ids
79
146
80 $ printf "cloned " ; hg id -R cloned
147 $ printf "cloned " ; hg id -R cloned
81 cloned 7f491f53a367 tip
148 cloned 7f491f53a367 tip
82 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
149 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
83 cloned/sub1 fc3b4ce2696f tip
150 cloned/sub1 fc3b4ce2696f tip
84 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
151 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
85 cloned/sub1/sub2 c57a0840e3ba tip
152 cloned/sub1/sub2 c57a0840e3ba tip
86
153
87 debugsub output for main and sub1
154 debugsub output for main and sub1
88
155
89 $ hg debugsub -R cloned
156 $ hg debugsub -R cloned
90 path sub1
157 path sub1
91 source ../sub1
158 source ../sub1
92 revision fc3b4ce2696f7741438c79207583768f2ce6b0dd
159 revision fc3b4ce2696f7741438c79207583768f2ce6b0dd
93 $ hg debugsub -R cloned/sub1
160 $ hg debugsub -R cloned/sub1
94 path sub2
161 path sub2
95 source ../sub2
162 source ../sub2
96 revision c57a0840e3badd667ef3c3ef65471609acb2ba3c
163 revision c57a0840e3badd667ef3c3ef65471609acb2ba3c
97
164
98 Modifying deeply nested 'sub2'
165 Modifying deeply nested 'sub2'
99
166
100 $ echo modified > cloned/sub1/sub2/sub2
167 $ echo modified > cloned/sub1/sub2/sub2
101 $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned
168 $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned
102 committing subrepository sub1
169 committing subrepository sub1
103 committing subrepository sub1/sub2 (glob)
170 committing subrepository sub1/sub2 (glob)
104
171
105 Checking modified node ids
172 Checking modified node ids
106
173
107 $ printf "cloned " ; hg id -R cloned
174 $ printf "cloned " ; hg id -R cloned
108 cloned ffe6649062fe tip
175 cloned ffe6649062fe tip
109 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
176 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
110 cloned/sub1 2ecb03bf44a9 tip
177 cloned/sub1 2ecb03bf44a9 tip
111 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
178 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
112 cloned/sub1/sub2 53dd3430bcaf tip
179 cloned/sub1/sub2 53dd3430bcaf tip
113
180
114 debugsub output for main and sub1
181 debugsub output for main and sub1
115
182
116 $ hg debugsub -R cloned
183 $ hg debugsub -R cloned
117 path sub1
184 path sub1
118 source ../sub1
185 source ../sub1
119 revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9
186 revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9
120 $ hg debugsub -R cloned/sub1
187 $ hg debugsub -R cloned/sub1
121 path sub2
188 path sub2
122 source ../sub2
189 source ../sub2
123 revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
190 revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
124
191
125 Check that deep archiving works
192 Check that deep archiving works
126
193
127 $ cd cloned
194 $ cd cloned
128 $ echo 'test' > sub1/sub2/test.txt
195 $ echo 'test' > sub1/sub2/test.txt
129 $ hg --config extensions.largefiles=! add sub1/sub2/test.txt
196 $ hg --config extensions.largefiles=! add sub1/sub2/test.txt
130 $ mkdir sub1/sub2/folder
197 $ mkdir sub1/sub2/folder
131 $ echo 'subfolder' > sub1/sub2/folder/test.txt
198 $ echo 'subfolder' > sub1/sub2/folder/test.txt
132 $ hg ci -ASm "add test.txt"
199 $ hg ci -ASm "add test.txt"
133 adding sub1/sub2/folder/test.txt
200 adding sub1/sub2/folder/test.txt
134 committing subrepository sub1
201 committing subrepository sub1
135 committing subrepository sub1/sub2 (glob)
202 committing subrepository sub1/sub2 (glob)
136
203
137 .. but first take a detour through some deep removal testing
204 .. but first take a detour through some deep removal testing
138
205
139 $ hg remove -S -I 're:.*.txt' .
206 $ hg remove -S -I 're:.*.txt' .
140 removing sub1/sub2/folder/test.txt (glob)
207 removing sub1/sub2/folder/test.txt (glob)
141 removing sub1/sub2/test.txt (glob)
208 removing sub1/sub2/test.txt (glob)
142 $ hg status -S
209 $ hg status -S
143 R sub1/sub2/folder/test.txt
210 R sub1/sub2/folder/test.txt
144 R sub1/sub2/test.txt
211 R sub1/sub2/test.txt
145 $ hg update -Cq
212 $ hg update -Cq
146 $ hg remove -I 're:.*.txt' sub1
213 $ hg remove -I 're:.*.txt' sub1
147 $ hg status -S
214 $ hg status -S
148 $ hg remove sub1/sub2/folder/test.txt
215 $ hg remove sub1/sub2/folder/test.txt
149 $ hg remove sub1/.hgsubstate
216 $ hg remove sub1/.hgsubstate
150 $ mv sub1/.hgsub sub1/x.hgsub
217 $ mv sub1/.hgsub sub1/x.hgsub
151 $ hg status -S
218 $ hg status -S
152 warning: subrepo spec file 'sub1/.hgsub' not found
219 warning: subrepo spec file 'sub1/.hgsub' not found
153 R sub1/.hgsubstate
220 R sub1/.hgsubstate
154 R sub1/sub2/folder/test.txt
221 R sub1/sub2/folder/test.txt
155 ! sub1/.hgsub
222 ! sub1/.hgsub
156 ? sub1/x.hgsub
223 ? sub1/x.hgsub
157 $ mv sub1/x.hgsub sub1/.hgsub
224 $ mv sub1/x.hgsub sub1/.hgsub
158 $ hg update -Cq
225 $ hg update -Cq
159 $ touch sub1/foo
226 $ touch sub1/foo
160 $ hg forget sub1/sub2/folder/test.txt
227 $ hg forget sub1/sub2/folder/test.txt
161 $ rm sub1/sub2/test.txt
228 $ rm sub1/sub2/test.txt
162
229
163 Test relative path printing + subrepos
230 Test relative path printing + subrepos
164 $ mkdir -p foo/bar
231 $ mkdir -p foo/bar
165 $ cd foo
232 $ cd foo
166 $ touch bar/abc
233 $ touch bar/abc
167 $ hg addremove -S ..
234 $ hg addremove -S ..
235 \r (no-eol) (esc)
236 searching for exact renames [ ] 0/1\r (no-eol) (esc)
237 \r (no-eol) (esc)
168 adding ../sub1/sub2/folder/test.txt (glob)
238 adding ../sub1/sub2/folder/test.txt (glob)
169 removing ../sub1/sub2/test.txt (glob)
239 removing ../sub1/sub2/test.txt (glob)
170 adding ../sub1/foo (glob)
240 adding ../sub1/foo (glob)
171 adding bar/abc (glob)
241 adding bar/abc (glob)
172 $ cd ..
242 $ cd ..
173 $ hg status -S
243 $ hg status -S
174 A foo/bar/abc
244 A foo/bar/abc
175 A sub1/foo
245 A sub1/foo
176 R sub1/sub2/test.txt
246 R sub1/sub2/test.txt
177
247
178 Archive wdir() with subrepos
248 Archive wdir() with subrepos
179 $ hg rm main
249 $ hg rm main
180 $ hg archive -S -r 'wdir()' ../wdir
250 $ hg archive -S -r 'wdir()' ../wdir
251 \r (no-eol) (esc)
252 archiving [ ] 0/3\r (no-eol) (esc)
253 archiving [=============> ] 1/3\r (no-eol) (esc)
254 archiving [===========================> ] 2/3\r (no-eol) (esc)
255 archiving [==========================================>] 3/3\r (no-eol) (esc)
256 \r (no-eol) (esc)
257 \r (no-eol) (esc)
258 archiving (sub1) [ ] 0/4\r (no-eol) (esc)
259 archiving (sub1) [========> ] 1/4\r (no-eol) (esc)
260 archiving (sub1) [=================> ] 2/4\r (no-eol) (esc)
261 archiving (sub1) [==========================> ] 3/4\r (no-eol) (esc)
262 archiving (sub1) [===================================>] 4/4\r (no-eol) (esc)
263 \r (no-eol) (esc)
264 \r (no-eol) (esc)
265 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
266 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
267 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
268 \r (no-eol) (esc)
181 $ diff -r . ../wdir | egrep -v '\.hg$|^Common subdirectories:'
269 $ diff -r . ../wdir | egrep -v '\.hg$|^Common subdirectories:'
182 Only in ../wdir: .hg_archival.txt
270 Only in ../wdir: .hg_archival.txt
183
271
184 $ find ../wdir -type f | sort
272 $ find ../wdir -type f | sort
185 ../wdir/.hg_archival.txt
273 ../wdir/.hg_archival.txt
186 ../wdir/.hgsub
274 ../wdir/.hgsub
187 ../wdir/.hgsubstate
275 ../wdir/.hgsubstate
188 ../wdir/foo/bar/abc
276 ../wdir/foo/bar/abc
189 ../wdir/sub1/.hgsub
277 ../wdir/sub1/.hgsub
190 ../wdir/sub1/.hgsubstate
278 ../wdir/sub1/.hgsubstate
191 ../wdir/sub1/foo
279 ../wdir/sub1/foo
192 ../wdir/sub1/sub1
280 ../wdir/sub1/sub1
193 ../wdir/sub1/sub2/folder/test.txt
281 ../wdir/sub1/sub2/folder/test.txt
194 ../wdir/sub1/sub2/sub2
282 ../wdir/sub1/sub2/sub2
195
283
196 $ cat ../wdir/.hg_archival.txt
284 $ cat ../wdir/.hg_archival.txt
197 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
285 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
198 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
286 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
199 branch: default
287 branch: default
200 latesttag: null
288 latesttag: null
201 latesttagdistance: 4
289 latesttagdistance: 4
202 changessincelatesttag: 4
290 changessincelatesttag: 4
203
291
204 Attempting to archive 'wdir()' with a missing file is handled gracefully
292 Attempting to archive 'wdir()' with a missing file is handled gracefully
205 $ rm sub1/sub1
293 $ rm sub1/sub1
206 $ rm -r ../wdir
294 $ rm -r ../wdir
207 $ hg archive -v -S -r 'wdir()' ../wdir
295 $ hg archive -v -S -r 'wdir()' ../wdir
296 \r (no-eol) (esc)
297 archiving [ ] 0/3\r (no-eol) (esc)
298 archiving [=============> ] 1/3\r (no-eol) (esc)
299 archiving [===========================> ] 2/3\r (no-eol) (esc)
300 archiving [==========================================>] 3/3\r (no-eol) (esc)
301 \r (no-eol) (esc)
302 \r (no-eol) (esc)
303 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
304 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
305 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
306 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
307 \r (no-eol) (esc)
308 \r (no-eol) (esc)
309 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
310 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
311 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
312 \r (no-eol) (esc)
208 $ find ../wdir -type f | sort
313 $ find ../wdir -type f | sort
209 ../wdir/.hg_archival.txt
314 ../wdir/.hg_archival.txt
210 ../wdir/.hgsub
315 ../wdir/.hgsub
211 ../wdir/.hgsubstate
316 ../wdir/.hgsubstate
212 ../wdir/foo/bar/abc
317 ../wdir/foo/bar/abc
213 ../wdir/sub1/.hgsub
318 ../wdir/sub1/.hgsub
214 ../wdir/sub1/.hgsubstate
319 ../wdir/sub1/.hgsubstate
215 ../wdir/sub1/foo
320 ../wdir/sub1/foo
216 ../wdir/sub1/sub2/folder/test.txt
321 ../wdir/sub1/sub2/folder/test.txt
217 ../wdir/sub1/sub2/sub2
322 ../wdir/sub1/sub2/sub2
218
323
219 Continue relative path printing + subrepos
324 Continue relative path printing + subrepos
220 $ hg update -Cq
325 $ hg update -Cq
221 $ rm -r ../wdir
326 $ rm -r ../wdir
222 $ hg archive -S -r 'wdir()' ../wdir
327 $ hg archive -S -r 'wdir()' ../wdir
328 \r (no-eol) (esc)
329 archiving [ ] 0/3\r (no-eol) (esc)
330 archiving [=============> ] 1/3\r (no-eol) (esc)
331 archiving [===========================> ] 2/3\r (no-eol) (esc)
332 archiving [==========================================>] 3/3\r (no-eol) (esc)
333 \r (no-eol) (esc)
334 \r (no-eol) (esc)
335 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
336 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
337 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
338 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
339 \r (no-eol) (esc)
340 \r (no-eol) (esc)
341 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
342 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
343 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
344 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
345 \r (no-eol) (esc)
223 $ cat ../wdir/.hg_archival.txt
346 $ cat ../wdir/.hg_archival.txt
224 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
347 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
225 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd
348 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd
226 branch: default
349 branch: default
227 latesttag: null
350 latesttag: null
228 latesttagdistance: 4
351 latesttagdistance: 4
229 changessincelatesttag: 4
352 changessincelatesttag: 4
230
353
231 $ touch sub1/sub2/folder/bar
354 $ touch sub1/sub2/folder/bar
232 $ hg addremove sub1/sub2
355 $ hg addremove sub1/sub2
233 adding sub1/sub2/folder/bar (glob)
356 adding sub1/sub2/folder/bar (glob)
234 $ hg status -S
357 $ hg status -S
235 A sub1/sub2/folder/bar
358 A sub1/sub2/folder/bar
236 ? foo/bar/abc
359 ? foo/bar/abc
237 ? sub1/foo
360 ? sub1/foo
238 $ hg update -Cq
361 $ hg update -Cq
239 $ hg addremove sub1
362 $ hg addremove sub1
240 adding sub1/sub2/folder/bar (glob)
363 adding sub1/sub2/folder/bar (glob)
241 adding sub1/foo (glob)
364 adding sub1/foo (glob)
242 $ hg update -Cq
365 $ hg update -Cq
243 $ rm sub1/sub2/folder/test.txt
366 $ rm sub1/sub2/folder/test.txt
244 $ rm sub1/sub2/test.txt
367 $ rm sub1/sub2/test.txt
245 $ hg ci -ASm "remove test.txt"
368 $ hg ci -ASm "remove test.txt"
246 adding sub1/sub2/folder/bar
369 adding sub1/sub2/folder/bar
247 removing sub1/sub2/folder/test.txt
370 removing sub1/sub2/folder/test.txt
248 removing sub1/sub2/test.txt
371 removing sub1/sub2/test.txt
249 adding sub1/foo
372 adding sub1/foo
250 adding foo/bar/abc
373 adding foo/bar/abc
251 committing subrepository sub1
374 committing subrepository sub1
252 committing subrepository sub1/sub2 (glob)
375 committing subrepository sub1/sub2 (glob)
253
376
254 $ hg forget sub1/sub2/sub2
377 $ hg forget sub1/sub2/sub2
255 $ echo x > sub1/sub2/x.txt
378 $ echo x > sub1/sub2/x.txt
256 $ hg add sub1/sub2/x.txt
379 $ hg add sub1/sub2/x.txt
257
380
258 Files sees uncommitted adds and removes in subrepos
381 Files sees uncommitted adds and removes in subrepos
259 $ hg files -S
382 $ hg files -S
260 .hgsub
383 .hgsub
261 .hgsubstate
384 .hgsubstate
262 foo/bar/abc (glob)
385 foo/bar/abc (glob)
263 main
386 main
264 sub1/.hgsub (glob)
387 sub1/.hgsub (glob)
265 sub1/.hgsubstate (glob)
388 sub1/.hgsubstate (glob)
266 sub1/foo (glob)
389 sub1/foo (glob)
267 sub1/sub1 (glob)
390 sub1/sub1 (glob)
268 sub1/sub2/folder/bar (glob)
391 sub1/sub2/folder/bar (glob)
269 sub1/sub2/x.txt (glob)
392 sub1/sub2/x.txt (glob)
270
393
271 $ hg files -S "set:eol('dos') or eol('unix') or size('<= 0')"
394 $ hg files -S "set:eol('dos') or eol('unix') or size('<= 0')"
272 .hgsub
395 .hgsub
273 .hgsubstate
396 .hgsubstate
274 foo/bar/abc (glob)
397 foo/bar/abc (glob)
275 main
398 main
276 sub1/.hgsub (glob)
399 sub1/.hgsub (glob)
277 sub1/.hgsubstate (glob)
400 sub1/.hgsubstate (glob)
278 sub1/foo (glob)
401 sub1/foo (glob)
279 sub1/sub1 (glob)
402 sub1/sub1 (glob)
280 sub1/sub2/folder/bar (glob)
403 sub1/sub2/folder/bar (glob)
281 sub1/sub2/x.txt (glob)
404 sub1/sub2/x.txt (glob)
282
405
283 $ hg files -r '.^' -S "set:eol('dos') or eol('unix')"
406 $ hg files -r '.^' -S "set:eol('dos') or eol('unix')"
284 .hgsub
407 .hgsub
285 .hgsubstate
408 .hgsubstate
286 main
409 main
287 sub1/.hgsub (glob)
410 sub1/.hgsub (glob)
288 sub1/.hgsubstate (glob)
411 sub1/.hgsubstate (glob)
289 sub1/sub1 (glob)
412 sub1/sub1 (glob)
290 sub1/sub2/folder/test.txt (glob)
413 sub1/sub2/folder/test.txt (glob)
291 sub1/sub2/sub2 (glob)
414 sub1/sub2/sub2 (glob)
292 sub1/sub2/test.txt (glob)
415 sub1/sub2/test.txt (glob)
293
416
294 $ hg files sub1
417 $ hg files sub1
295 sub1/.hgsub (glob)
418 sub1/.hgsub (glob)
296 sub1/.hgsubstate (glob)
419 sub1/.hgsubstate (glob)
297 sub1/foo (glob)
420 sub1/foo (glob)
298 sub1/sub1 (glob)
421 sub1/sub1 (glob)
299 sub1/sub2/folder/bar (glob)
422 sub1/sub2/folder/bar (glob)
300 sub1/sub2/x.txt (glob)
423 sub1/sub2/x.txt (glob)
301
424
302 $ hg files sub1/sub2
425 $ hg files sub1/sub2
303 sub1/sub2/folder/bar (glob)
426 sub1/sub2/folder/bar (glob)
304 sub1/sub2/x.txt (glob)
427 sub1/sub2/x.txt (glob)
305
428
306 $ hg files
429 $ hg files
307 .hgsub
430 .hgsub
308 .hgsubstate
431 .hgsubstate
309 foo/bar/abc (glob)
432 foo/bar/abc (glob)
310 main
433 main
311
434
312 $ hg files -S -r '.^' sub1/sub2/folder
435 $ hg files -S -r '.^' sub1/sub2/folder
313 sub1/sub2/folder/test.txt (glob)
436 sub1/sub2/folder/test.txt (glob)
314
437
315 $ hg files -S -r '.^' sub1/sub2/missing
438 $ hg files -S -r '.^' sub1/sub2/missing
316 sub1/sub2/missing: no such file in rev 78026e779ea6 (glob)
439 sub1/sub2/missing: no such file in rev 78026e779ea6 (glob)
317 [1]
440 [1]
318
441
319 $ hg files -r '.^' sub1/
442 $ hg files -r '.^' sub1/
320 sub1/.hgsub (glob)
443 sub1/.hgsub (glob)
321 sub1/.hgsubstate (glob)
444 sub1/.hgsubstate (glob)
322 sub1/sub1 (glob)
445 sub1/sub1 (glob)
323 sub1/sub2/folder/test.txt (glob)
446 sub1/sub2/folder/test.txt (glob)
324 sub1/sub2/sub2 (glob)
447 sub1/sub2/sub2 (glob)
325 sub1/sub2/test.txt (glob)
448 sub1/sub2/test.txt (glob)
326
449
327 $ hg files -r '.^' sub1/sub2
450 $ hg files -r '.^' sub1/sub2
328 sub1/sub2/folder/test.txt (glob)
451 sub1/sub2/folder/test.txt (glob)
329 sub1/sub2/sub2 (glob)
452 sub1/sub2/sub2 (glob)
330 sub1/sub2/test.txt (glob)
453 sub1/sub2/test.txt (glob)
331
454
332 $ hg rollback -q
455 $ hg rollback -q
333 $ hg up -Cq
456 $ hg up -Cq
334
457
335 $ hg --config extensions.largefiles=! archive -S ../archive_all
458 $ hg --config extensions.largefiles=! archive -S ../archive_all
459 \r (no-eol) (esc)
460 archiving [ ] 0/3\r (no-eol) (esc)
461 archiving [=============> ] 1/3\r (no-eol) (esc)
462 archiving [===========================> ] 2/3\r (no-eol) (esc)
463 archiving [==========================================>] 3/3\r (no-eol) (esc)
464 \r (no-eol) (esc)
465 \r (no-eol) (esc)
466 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
467 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
468 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
469 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
470 \r (no-eol) (esc)
471 \r (no-eol) (esc)
472 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
473 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
474 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
475 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
476 \r (no-eol) (esc)
336 $ find ../archive_all | sort
477 $ find ../archive_all | sort
337 ../archive_all
478 ../archive_all
338 ../archive_all/.hg_archival.txt
479 ../archive_all/.hg_archival.txt
339 ../archive_all/.hgsub
480 ../archive_all/.hgsub
340 ../archive_all/.hgsubstate
481 ../archive_all/.hgsubstate
341 ../archive_all/main
482 ../archive_all/main
342 ../archive_all/sub1
483 ../archive_all/sub1
343 ../archive_all/sub1/.hgsub
484 ../archive_all/sub1/.hgsub
344 ../archive_all/sub1/.hgsubstate
485 ../archive_all/sub1/.hgsubstate
345 ../archive_all/sub1/sub1
486 ../archive_all/sub1/sub1
346 ../archive_all/sub1/sub2
487 ../archive_all/sub1/sub2
347 ../archive_all/sub1/sub2/folder
488 ../archive_all/sub1/sub2/folder
348 ../archive_all/sub1/sub2/folder/test.txt
489 ../archive_all/sub1/sub2/folder/test.txt
349 ../archive_all/sub1/sub2/sub2
490 ../archive_all/sub1/sub2/sub2
350 ../archive_all/sub1/sub2/test.txt
491 ../archive_all/sub1/sub2/test.txt
351
492
352 Check that archive -X works in deep subrepos
493 Check that archive -X works in deep subrepos
353
494
354 $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude
495 $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude
496 \r (no-eol) (esc)
497 archiving [ ] 0/3\r (no-eol) (esc)
498 archiving [=============> ] 1/3\r (no-eol) (esc)
499 archiving [===========================> ] 2/3\r (no-eol) (esc)
500 archiving [==========================================>] 3/3\r (no-eol) (esc)
501 \r (no-eol) (esc)
502 \r (no-eol) (esc)
503 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
504 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
505 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
506 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
507 \r (no-eol) (esc)
508 \r (no-eol) (esc)
509 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
510 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
511 \r (no-eol) (esc)
355 $ find ../archive_exclude | sort
512 $ find ../archive_exclude | sort
356 ../archive_exclude
513 ../archive_exclude
357 ../archive_exclude/.hg_archival.txt
514 ../archive_exclude/.hg_archival.txt
358 ../archive_exclude/.hgsub
515 ../archive_exclude/.hgsub
359 ../archive_exclude/.hgsubstate
516 ../archive_exclude/.hgsubstate
360 ../archive_exclude/main
517 ../archive_exclude/main
361 ../archive_exclude/sub1
518 ../archive_exclude/sub1
362 ../archive_exclude/sub1/.hgsub
519 ../archive_exclude/sub1/.hgsub
363 ../archive_exclude/sub1/.hgsubstate
520 ../archive_exclude/sub1/.hgsubstate
364 ../archive_exclude/sub1/sub1
521 ../archive_exclude/sub1/sub1
365 ../archive_exclude/sub1/sub2
522 ../archive_exclude/sub1/sub2
366 ../archive_exclude/sub1/sub2/sub2
523 ../archive_exclude/sub1/sub2/sub2
367
524
368 $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include
525 $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include
526 \r (no-eol) (esc)
527 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
528 \r (no-eol) (esc)
529 \r (no-eol) (esc)
530 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
531 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
532 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
533 \r (no-eol) (esc)
369 $ find ../archive_include | sort
534 $ find ../archive_include | sort
370 ../archive_include
535 ../archive_include
371 ../archive_include/sub1
536 ../archive_include/sub1
372 ../archive_include/sub1/sub2
537 ../archive_include/sub1/sub2
373 ../archive_include/sub1/sub2/folder
538 ../archive_include/sub1/sub2/folder
374 ../archive_include/sub1/sub2/folder/test.txt
539 ../archive_include/sub1/sub2/folder/test.txt
375 ../archive_include/sub1/sub2/test.txt
540 ../archive_include/sub1/sub2/test.txt
376
541
377 Check that deep archive works with largefiles (which overrides hgsubrepo impl)
542 Check that deep archive works with largefiles (which overrides hgsubrepo impl)
378 This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo
543 This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo
379 subrepos are archived properly.
544 subrepos are archived properly.
380 Note that add --large through a subrepo currently adds the file as a normal file
545 Note that add --large through a subrepo currently adds the file as a normal file
381
546
382 $ echo "large" > sub1/sub2/large.bin
547 $ echo "large" > sub1/sub2/large.bin
383 $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin
548 $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin
384 $ echo "large" > large.bin
549 $ echo "large" > large.bin
385 $ hg --config extensions.largefiles= add --large large.bin
550 $ hg --config extensions.largefiles= add --large large.bin
386 $ hg --config extensions.largefiles= ci -S -m "add large files"
551 $ hg --config extensions.largefiles= ci -S -m "add large files"
387 committing subrepository sub1
552 committing subrepository sub1
388 committing subrepository sub1/sub2 (glob)
553 committing subrepository sub1/sub2 (glob)
389
554
390 $ hg --config extensions.largefiles= archive -S ../archive_lf
555 $ hg --config extensions.largefiles= archive -S ../archive_lf
391 $ find ../archive_lf | sort
556 $ find ../archive_lf | sort
392 ../archive_lf
557 ../archive_lf
393 ../archive_lf/.hg_archival.txt
558 ../archive_lf/.hg_archival.txt
394 ../archive_lf/.hgsub
559 ../archive_lf/.hgsub
395 ../archive_lf/.hgsubstate
560 ../archive_lf/.hgsubstate
396 ../archive_lf/large.bin
561 ../archive_lf/large.bin
397 ../archive_lf/main
562 ../archive_lf/main
398 ../archive_lf/sub1
563 ../archive_lf/sub1
399 ../archive_lf/sub1/.hgsub
564 ../archive_lf/sub1/.hgsub
400 ../archive_lf/sub1/.hgsubstate
565 ../archive_lf/sub1/.hgsubstate
401 ../archive_lf/sub1/sub1
566 ../archive_lf/sub1/sub1
402 ../archive_lf/sub1/sub2
567 ../archive_lf/sub1/sub2
403 ../archive_lf/sub1/sub2/folder
568 ../archive_lf/sub1/sub2/folder
404 ../archive_lf/sub1/sub2/folder/test.txt
569 ../archive_lf/sub1/sub2/folder/test.txt
405 ../archive_lf/sub1/sub2/large.bin
570 ../archive_lf/sub1/sub2/large.bin
406 ../archive_lf/sub1/sub2/sub2
571 ../archive_lf/sub1/sub2/sub2
407 ../archive_lf/sub1/sub2/test.txt
572 ../archive_lf/sub1/sub2/test.txt
408 $ rm -rf ../archive_lf
573 $ rm -rf ../archive_lf
409
574
410 Exclude large files from main and sub-sub repo
575 Exclude large files from main and sub-sub repo
411
576
412 $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf
577 $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf
413 $ find ../archive_lf | sort
578 $ find ../archive_lf | sort
414 ../archive_lf
579 ../archive_lf
415 ../archive_lf/.hg_archival.txt
580 ../archive_lf/.hg_archival.txt
416 ../archive_lf/.hgsub
581 ../archive_lf/.hgsub
417 ../archive_lf/.hgsubstate
582 ../archive_lf/.hgsubstate
418 ../archive_lf/main
583 ../archive_lf/main
419 ../archive_lf/sub1
584 ../archive_lf/sub1
420 ../archive_lf/sub1/.hgsub
585 ../archive_lf/sub1/.hgsub
421 ../archive_lf/sub1/.hgsubstate
586 ../archive_lf/sub1/.hgsubstate
422 ../archive_lf/sub1/sub1
587 ../archive_lf/sub1/sub1
423 ../archive_lf/sub1/sub2
588 ../archive_lf/sub1/sub2
424 ../archive_lf/sub1/sub2/folder
589 ../archive_lf/sub1/sub2/folder
425 ../archive_lf/sub1/sub2/folder/test.txt
590 ../archive_lf/sub1/sub2/folder/test.txt
426 ../archive_lf/sub1/sub2/sub2
591 ../archive_lf/sub1/sub2/sub2
427 ../archive_lf/sub1/sub2/test.txt
592 ../archive_lf/sub1/sub2/test.txt
428 $ rm -rf ../archive_lf
593 $ rm -rf ../archive_lf
429
594
430 Exclude normal files from main and sub-sub repo
595 Exclude normal files from main and sub-sub repo
431
596
432 $ hg --config extensions.largefiles= archive -S -X '**.txt' -p '.' ../archive_lf.tgz
597 $ hg --config extensions.largefiles= archive -S -X '**.txt' -p '.' ../archive_lf.tgz
433 $ tar -tzf ../archive_lf.tgz | sort
598 $ tar -tzf ../archive_lf.tgz | sort
434 .hgsub
599 .hgsub
435 .hgsubstate
600 .hgsubstate
436 large.bin
601 large.bin
437 main
602 main
438 sub1/.hgsub
603 sub1/.hgsub
439 sub1/.hgsubstate
604 sub1/.hgsubstate
440 sub1/sub1
605 sub1/sub1
441 sub1/sub2/large.bin
606 sub1/sub2/large.bin
442 sub1/sub2/sub2
607 sub1/sub2/sub2
443
608
444 Include normal files from within a largefiles subrepo
609 Include normal files from within a largefiles subrepo
445
610
446 $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf
611 $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf
447 $ find ../archive_lf | sort
612 $ find ../archive_lf | sort
448 ../archive_lf
613 ../archive_lf
449 ../archive_lf/.hg_archival.txt
614 ../archive_lf/.hg_archival.txt
450 ../archive_lf/sub1
615 ../archive_lf/sub1
451 ../archive_lf/sub1/sub2
616 ../archive_lf/sub1/sub2
452 ../archive_lf/sub1/sub2/folder
617 ../archive_lf/sub1/sub2/folder
453 ../archive_lf/sub1/sub2/folder/test.txt
618 ../archive_lf/sub1/sub2/folder/test.txt
454 ../archive_lf/sub1/sub2/test.txt
619 ../archive_lf/sub1/sub2/test.txt
455 $ rm -rf ../archive_lf
620 $ rm -rf ../archive_lf
456
621
457 Include large files from within a largefiles subrepo
622 Include large files from within a largefiles subrepo
458
623
459 $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf
624 $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf
460 $ find ../archive_lf | sort
625 $ find ../archive_lf | sort
461 ../archive_lf
626 ../archive_lf
462 ../archive_lf/large.bin
627 ../archive_lf/large.bin
463 ../archive_lf/sub1
628 ../archive_lf/sub1
464 ../archive_lf/sub1/sub2
629 ../archive_lf/sub1/sub2
465 ../archive_lf/sub1/sub2/large.bin
630 ../archive_lf/sub1/sub2/large.bin
466 $ rm -rf ../archive_lf
631 $ rm -rf ../archive_lf
467
632
468 Find an exact largefile match in a largefiles subrepo
633 Find an exact largefile match in a largefiles subrepo
469
634
470 $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf
635 $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf
471 $ find ../archive_lf | sort
636 $ find ../archive_lf | sort
472 ../archive_lf
637 ../archive_lf
473 ../archive_lf/sub1
638 ../archive_lf/sub1
474 ../archive_lf/sub1/sub2
639 ../archive_lf/sub1/sub2
475 ../archive_lf/sub1/sub2/large.bin
640 ../archive_lf/sub1/sub2/large.bin
476 $ rm -rf ../archive_lf
641 $ rm -rf ../archive_lf
477
642
478 The local repo enables largefiles if a largefiles repo is cloned
643 The local repo enables largefiles if a largefiles repo is cloned
479 $ hg showconfig extensions
644 $ hg showconfig extensions
480 abort: repository requires features unknown to this Mercurial: largefiles!
645 abort: repository requires features unknown to this Mercurial: largefiles!
481 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
646 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
482 [255]
647 [255]
483 $ hg --config extensions.largefiles= clone -qU . ../lfclone
648 $ hg --config extensions.largefiles= clone -qU . ../lfclone
484 $ cat ../lfclone/.hg/hgrc
649 $ cat ../lfclone/.hg/hgrc
485 # example repository config (see "hg help config" for more info)
650 # example repository config (see "hg help config" for more info)
486 [paths]
651 [paths]
487 default = $TESTTMP/cloned (glob)
652 default = $TESTTMP/cloned (glob)
488
653
489 # path aliases to other clones of this repo in URLs or filesystem paths
654 # path aliases to other clones of this repo in URLs or filesystem paths
490 # (see "hg help config.paths" for more info)
655 # (see "hg help config.paths" for more info)
491 #
656 #
492 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
657 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
493 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
658 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
494 # my-clone = /home/jdoe/jdoes-clone
659 # my-clone = /home/jdoe/jdoes-clone
495
660
496 [ui]
661 [ui]
497 # name and email (local to this repository, optional), e.g.
662 # name and email (local to this repository, optional), e.g.
498 # username = Jane Doe <jdoe@example.com>
663 # username = Jane Doe <jdoe@example.com>
499
664
500 [extensions]
665 [extensions]
501 largefiles=
666 largefiles=
502
667
503 Find an exact match to a standin (should archive nothing)
668 Find an exact match to a standin (should archive nothing)
504 $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf
669 $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf
505 $ find ../archive_lf 2> /dev/null | sort
670 $ find ../archive_lf 2> /dev/null | sort
506
671
507 $ cat >> $HGRCPATH <<EOF
672 $ cat >> $HGRCPATH <<EOF
508 > [extensions]
673 > [extensions]
509 > largefiles=
674 > largefiles=
510 > [largefiles]
675 > [largefiles]
511 > patterns=glob:**.dat
676 > patterns=glob:**.dat
512 > EOF
677 > EOF
513
678
514 Test forget through a deep subrepo with the largefiles extension, both a
679 Test forget through a deep subrepo with the largefiles extension, both a
515 largefile and a normal file. Then a largefile that hasn't been committed yet.
680 largefile and a normal file. Then a largefile that hasn't been committed yet.
516 $ touch sub1/sub2/untracked.txt
681 $ touch sub1/sub2/untracked.txt
517 $ touch sub1/sub2/large.dat
682 $ touch sub1/sub2/large.dat
518 $ hg forget sub1/sub2/large.bin sub1/sub2/test.txt sub1/sub2/untracked.txt
683 $ hg forget sub1/sub2/large.bin sub1/sub2/test.txt sub1/sub2/untracked.txt
519 not removing sub1/sub2/untracked.txt: file is already untracked (glob)
684 not removing sub1/sub2/untracked.txt: file is already untracked (glob)
520 [1]
685 [1]
521 $ hg add --large --dry-run -v sub1/sub2/untracked.txt
686 $ hg add --large --dry-run -v sub1/sub2/untracked.txt
522 adding sub1/sub2/untracked.txt as a largefile (glob)
687 adding sub1/sub2/untracked.txt as a largefile (glob)
523 $ hg add --large -v sub1/sub2/untracked.txt
688 $ hg add --large -v sub1/sub2/untracked.txt
524 adding sub1/sub2/untracked.txt as a largefile (glob)
689 adding sub1/sub2/untracked.txt as a largefile (glob)
525 $ hg add --normal -v sub1/sub2/large.dat
690 $ hg add --normal -v sub1/sub2/large.dat
526 adding sub1/sub2/large.dat (glob)
691 adding sub1/sub2/large.dat (glob)
527 $ hg forget -v sub1/sub2/untracked.txt
692 $ hg forget -v sub1/sub2/untracked.txt
528 removing sub1/sub2/untracked.txt (glob)
693 removing sub1/sub2/untracked.txt (glob)
529 $ hg status -S
694 $ hg status -S
530 A sub1/sub2/large.dat
695 A sub1/sub2/large.dat
531 R sub1/sub2/large.bin
696 R sub1/sub2/large.bin
532 R sub1/sub2/test.txt
697 R sub1/sub2/test.txt
533 ? foo/bar/abc
698 ? foo/bar/abc
534 ? sub1/sub2/untracked.txt
699 ? sub1/sub2/untracked.txt
535 ? sub1/sub2/x.txt
700 ? sub1/sub2/x.txt
536 $ hg add sub1/sub2
701 $ hg add sub1/sub2
537
702
538 $ hg archive -S -r 'wdir()' ../wdir2
703 $ hg archive -S -r 'wdir()' ../wdir2
539 $ diff -r . ../wdir2 | egrep -v '\.hg$|^Common subdirectories:'
704 $ diff -r . ../wdir2 | egrep -v '\.hg$|^Common subdirectories:'
540 Only in ../wdir2: .hg_archival.txt
705 Only in ../wdir2: .hg_archival.txt
541 Only in .: .hglf
706 Only in .: .hglf
542 Only in .: foo
707 Only in .: foo
543 Only in ./sub1/sub2: large.bin
708 Only in ./sub1/sub2: large.bin
544 Only in ./sub1/sub2: test.txt
709 Only in ./sub1/sub2: test.txt
545 Only in ./sub1/sub2: untracked.txt
710 Only in ./sub1/sub2: untracked.txt
546 Only in ./sub1/sub2: x.txt
711 Only in ./sub1/sub2: x.txt
547 $ find ../wdir2 -type f | sort
712 $ find ../wdir2 -type f | sort
548 ../wdir2/.hg_archival.txt
713 ../wdir2/.hg_archival.txt
549 ../wdir2/.hgsub
714 ../wdir2/.hgsub
550 ../wdir2/.hgsubstate
715 ../wdir2/.hgsubstate
551 ../wdir2/large.bin
716 ../wdir2/large.bin
552 ../wdir2/main
717 ../wdir2/main
553 ../wdir2/sub1/.hgsub
718 ../wdir2/sub1/.hgsub
554 ../wdir2/sub1/.hgsubstate
719 ../wdir2/sub1/.hgsubstate
555 ../wdir2/sub1/sub1
720 ../wdir2/sub1/sub1
556 ../wdir2/sub1/sub2/folder/test.txt
721 ../wdir2/sub1/sub2/folder/test.txt
557 ../wdir2/sub1/sub2/large.dat
722 ../wdir2/sub1/sub2/large.dat
558 ../wdir2/sub1/sub2/sub2
723 ../wdir2/sub1/sub2/sub2
559 $ hg status -S -mac -n | sort
724 $ hg status -S -mac -n | sort
560 .hgsub
725 .hgsub
561 .hgsubstate
726 .hgsubstate
562 large.bin
727 large.bin
563 main
728 main
564 sub1/.hgsub
729 sub1/.hgsub
565 sub1/.hgsubstate
730 sub1/.hgsubstate
566 sub1/sub1
731 sub1/sub1
567 sub1/sub2/folder/test.txt
732 sub1/sub2/folder/test.txt
568 sub1/sub2/large.dat
733 sub1/sub2/large.dat
569 sub1/sub2/sub2
734 sub1/sub2/sub2
570
735
571 $ hg ci -Sqm 'forget testing'
736 $ hg ci -Sqm 'forget testing'
572
737
573 Test 'wdir()' modified file archiving with largefiles
738 Test 'wdir()' modified file archiving with largefiles
574 $ echo 'mod' > main
739 $ echo 'mod' > main
575 $ echo 'mod' > large.bin
740 $ echo 'mod' > large.bin
576 $ echo 'mod' > sub1/sub2/large.dat
741 $ echo 'mod' > sub1/sub2/large.dat
577 $ hg archive -S -r 'wdir()' ../wdir3
742 $ hg archive -S -r 'wdir()' ../wdir3
578 $ diff -r . ../wdir3 | egrep -v '\.hg$|^Common subdirectories'
743 $ diff -r . ../wdir3 | egrep -v '\.hg$|^Common subdirectories'
579 Only in ../wdir3: .hg_archival.txt
744 Only in ../wdir3: .hg_archival.txt
580 Only in .: .hglf
745 Only in .: .hglf
581 Only in .: foo
746 Only in .: foo
582 Only in ./sub1/sub2: large.bin
747 Only in ./sub1/sub2: large.bin
583 Only in ./sub1/sub2: test.txt
748 Only in ./sub1/sub2: test.txt
584 Only in ./sub1/sub2: untracked.txt
749 Only in ./sub1/sub2: untracked.txt
585 Only in ./sub1/sub2: x.txt
750 Only in ./sub1/sub2: x.txt
586 $ find ../wdir3 -type f | sort
751 $ find ../wdir3 -type f | sort
587 ../wdir3/.hg_archival.txt
752 ../wdir3/.hg_archival.txt
588 ../wdir3/.hgsub
753 ../wdir3/.hgsub
589 ../wdir3/.hgsubstate
754 ../wdir3/.hgsubstate
590 ../wdir3/large.bin
755 ../wdir3/large.bin
591 ../wdir3/main
756 ../wdir3/main
592 ../wdir3/sub1/.hgsub
757 ../wdir3/sub1/.hgsub
593 ../wdir3/sub1/.hgsubstate
758 ../wdir3/sub1/.hgsubstate
594 ../wdir3/sub1/sub1
759 ../wdir3/sub1/sub1
595 ../wdir3/sub1/sub2/folder/test.txt
760 ../wdir3/sub1/sub2/folder/test.txt
596 ../wdir3/sub1/sub2/large.dat
761 ../wdir3/sub1/sub2/large.dat
597 ../wdir3/sub1/sub2/sub2
762 ../wdir3/sub1/sub2/sub2
598 $ hg up -Cq
763 $ hg up -Cq
599
764
600 Test issue4330: commit a directory where only normal files have changed
765 Test issue4330: commit a directory where only normal files have changed
601 $ touch foo/bar/large.dat
766 $ touch foo/bar/large.dat
602 $ hg add --large foo/bar/large.dat
767 $ hg add --large foo/bar/large.dat
603 $ hg ci -m 'add foo/bar/large.dat'
768 $ hg ci -m 'add foo/bar/large.dat'
604 $ touch a.txt
769 $ touch a.txt
605 $ touch a.dat
770 $ touch a.dat
606 $ hg add -v foo/bar/abc a.txt a.dat
771 $ hg add -v foo/bar/abc a.txt a.dat
607 adding a.dat as a largefile
772 adding a.dat as a largefile
608 adding a.txt
773 adding a.txt
609 adding foo/bar/abc (glob)
774 adding foo/bar/abc (glob)
610 $ hg ci -m 'dir commit with only normal file deltas' foo/bar
775 $ hg ci -m 'dir commit with only normal file deltas' foo/bar
611 $ hg status
776 $ hg status
612 A a.dat
777 A a.dat
613 A a.txt
778 A a.txt
614
779
615 Test a directory commit with a changed largefile and a changed normal file
780 Test a directory commit with a changed largefile and a changed normal file
616 $ echo changed > foo/bar/large.dat
781 $ echo changed > foo/bar/large.dat
617 $ echo changed > foo/bar/abc
782 $ echo changed > foo/bar/abc
618 $ hg ci -m 'dir commit with normal and lf file deltas' foo
783 $ hg ci -m 'dir commit with normal and lf file deltas' foo
619 $ hg status
784 $ hg status
620 A a.dat
785 A a.dat
621 A a.txt
786 A a.txt
622
787
623 $ hg ci -m "add a.*"
788 $ hg ci -m "add a.*"
624 $ hg mv a.dat b.dat
789 $ hg mv a.dat b.dat
625 $ hg mv foo/bar/abc foo/bar/def
790 $ hg mv foo/bar/abc foo/bar/def
626 $ hg status -C
791 $ hg status -C
627 A b.dat
792 A b.dat
628 a.dat
793 a.dat
629 A foo/bar/def
794 A foo/bar/def
630 foo/bar/abc
795 foo/bar/abc
631 R a.dat
796 R a.dat
632 R foo/bar/abc
797 R foo/bar/abc
633
798
634 $ hg ci -m "move large and normal"
799 $ hg ci -m "move large and normal"
635 $ hg status -C --rev '.^' --rev .
800 $ hg status -C --rev '.^' --rev .
636 A b.dat
801 A b.dat
637 a.dat
802 a.dat
638 A foo/bar/def
803 A foo/bar/def
639 foo/bar/abc
804 foo/bar/abc
640 R a.dat
805 R a.dat
641 R foo/bar/abc
806 R foo/bar/abc
642
807
643
808
644 $ echo foo > main
809 $ echo foo > main
645 $ hg ci -m "mod parent only"
810 $ hg ci -m "mod parent only"
646 $ hg init sub3
811 $ hg init sub3
647 $ echo "sub3 = sub3" >> .hgsub
812 $ echo "sub3 = sub3" >> .hgsub
648 $ echo xyz > sub3/a.txt
813 $ echo xyz > sub3/a.txt
649 $ hg add sub3/a.txt
814 $ hg add sub3/a.txt
650 $ hg ci -Sm "add sub3"
815 $ hg ci -Sm "add sub3"
651 committing subrepository sub3
816 committing subrepository sub3
652 $ cat .hgsub | grep -v sub3 > .hgsub1
817 $ cat .hgsub | grep -v sub3 > .hgsub1
653 $ mv .hgsub1 .hgsub
818 $ mv .hgsub1 .hgsub
654 $ hg ci -m "remove sub3"
819 $ hg ci -m "remove sub3"
655
820
656 $ hg log -r "subrepo()" --style compact
821 $ hg log -r "subrepo()" --style compact
657 0 7f491f53a367 1970-01-01 00:00 +0000 test
822 0 7f491f53a367 1970-01-01 00:00 +0000 test
658 main import
823 main import
659
824
660 1 ffe6649062fe 1970-01-01 00:00 +0000 test
825 1 ffe6649062fe 1970-01-01 00:00 +0000 test
661 deep nested modif should trigger a commit
826 deep nested modif should trigger a commit
662
827
663 2 9bb10eebee29 1970-01-01 00:00 +0000 test
828 2 9bb10eebee29 1970-01-01 00:00 +0000 test
664 add test.txt
829 add test.txt
665
830
666 3 7c64f035294f 1970-01-01 00:00 +0000 test
831 3 7c64f035294f 1970-01-01 00:00 +0000 test
667 add large files
832 add large files
668
833
669 4 f734a59e2e35 1970-01-01 00:00 +0000 test
834 4 f734a59e2e35 1970-01-01 00:00 +0000 test
670 forget testing
835 forget testing
671
836
672 11 9685a22af5db 1970-01-01 00:00 +0000 test
837 11 9685a22af5db 1970-01-01 00:00 +0000 test
673 add sub3
838 add sub3
674
839
675 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
840 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
676 remove sub3
841 remove sub3
677
842
678 $ hg log -r "subrepo('sub3')" --style compact
843 $ hg log -r "subrepo('sub3')" --style compact
679 11 9685a22af5db 1970-01-01 00:00 +0000 test
844 11 9685a22af5db 1970-01-01 00:00 +0000 test
680 add sub3
845 add sub3
681
846
682 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
847 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
683 remove sub3
848 remove sub3
684
849
685 $ hg log -r "subrepo('bogus')" --style compact
850 $ hg log -r "subrepo('bogus')" --style compact
686
851
687
852
688 Test .hgsubstate in the R state
853 Test .hgsubstate in the R state
689
854
690 $ hg rm .hgsub .hgsubstate
855 $ hg rm .hgsub .hgsubstate
691 $ hg ci -m 'trash subrepo tracking'
856 $ hg ci -m 'trash subrepo tracking'
692
857
693 $ hg log -r "subrepo('re:sub\d+')" --style compact
858 $ hg log -r "subrepo('re:sub\d+')" --style compact
694 0 7f491f53a367 1970-01-01 00:00 +0000 test
859 0 7f491f53a367 1970-01-01 00:00 +0000 test
695 main import
860 main import
696
861
697 1 ffe6649062fe 1970-01-01 00:00 +0000 test
862 1 ffe6649062fe 1970-01-01 00:00 +0000 test
698 deep nested modif should trigger a commit
863 deep nested modif should trigger a commit
699
864
700 2 9bb10eebee29 1970-01-01 00:00 +0000 test
865 2 9bb10eebee29 1970-01-01 00:00 +0000 test
701 add test.txt
866 add test.txt
702
867
703 3 7c64f035294f 1970-01-01 00:00 +0000 test
868 3 7c64f035294f 1970-01-01 00:00 +0000 test
704 add large files
869 add large files
705
870
706 4 f734a59e2e35 1970-01-01 00:00 +0000 test
871 4 f734a59e2e35 1970-01-01 00:00 +0000 test
707 forget testing
872 forget testing
708
873
709 11 9685a22af5db 1970-01-01 00:00 +0000 test
874 11 9685a22af5db 1970-01-01 00:00 +0000 test
710 add sub3
875 add sub3
711
876
712 12 2e0485b475b9 1970-01-01 00:00 +0000 test
877 12 2e0485b475b9 1970-01-01 00:00 +0000 test
713 remove sub3
878 remove sub3
714
879
715 13[tip] a68b2c361653 1970-01-01 00:00 +0000 test
880 13[tip] a68b2c361653 1970-01-01 00:00 +0000 test
716 trash subrepo tracking
881 trash subrepo tracking
717
882
718
883
719 Restore the trashed subrepo tracking
884 Restore the trashed subrepo tracking
720
885
721 $ hg rollback -q
886 $ hg rollback -q
722 $ hg update -Cq .
887 $ hg update -Cq .
723
888
724 Interaction with extdiff, largefiles and subrepos
889 Interaction with extdiff, largefiles and subrepos
725
890
726 $ hg --config extensions.extdiff= pdiff -S
891 $ hg --config extensions.extdiff= pdiff -S
727
892
728 $ hg --config extensions.extdiff= pdiff -r '.^' -S
893 $ hg --config extensions.extdiff= pdiff -r '.^' -S
894 \r (no-eol) (esc)
895 archiving [ ] 0/2\r (no-eol) (esc)
896 archiving [====================> ] 1/2\r (no-eol) (esc)
897 archiving [==========================================>] 2/2\r (no-eol) (esc)
898 \r (no-eol) (esc)
899 \r (no-eol) (esc)
900 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
901 \r (no-eol) (esc)
902 \r (no-eol) (esc)
903 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
904 \r (no-eol) (esc)
905 \r (no-eol) (esc)
906 archiving (sub3) [ <=> ] 0\r (no-eol) (esc)
907 \r (no-eol) (esc)
908 \r (no-eol) (esc)
909 archiving [ ] 0/2\r (no-eol) (esc)
910 archiving [====================> ] 1/2\r (no-eol) (esc)
911 archiving [==========================================>] 2/2\r (no-eol) (esc)
912 \r (no-eol) (esc)
913 \r (no-eol) (esc)
914 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
915 \r (no-eol) (esc)
916 \r (no-eol) (esc)
917 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
918 \r (no-eol) (esc)
729 diff -Nru cloned.*/.hgsub cloned/.hgsub (glob)
919 diff -Nru cloned.*/.hgsub cloned/.hgsub (glob)
730 --- cloned.*/.hgsub * (glob)
920 --- cloned.*/.hgsub * (glob)
731 +++ cloned/.hgsub * (glob)
921 +++ cloned/.hgsub * (glob)
732 @@ -1,2 +1* @@ (glob)
922 @@ -1,2 +1* @@ (glob)
733 sub1 = ../sub1
923 sub1 = ../sub1
734 -sub3 = sub3
924 -sub3 = sub3
735 diff -Nru cloned.*/.hgsubstate cloned/.hgsubstate (glob)
925 diff -Nru cloned.*/.hgsubstate cloned/.hgsubstate (glob)
736 --- cloned.*/.hgsubstate * (glob)
926 --- cloned.*/.hgsubstate * (glob)
737 +++ cloned/.hgsubstate * (glob)
927 +++ cloned/.hgsubstate * (glob)
738 @@ -1,2 +1* @@ (glob)
928 @@ -1,2 +1* @@ (glob)
739 7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
929 7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
740 -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
930 -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
741 [1]
931 [1]
742
932
743 $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S
933 $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S
934 \r (no-eol) (esc)
935 archiving [ ] 0/3\r (no-eol) (esc)
936 archiving [=============> ] 1/3\r (no-eol) (esc)
937 archiving [===========================> ] 2/3\r (no-eol) (esc)
938 archiving [==========================================>] 3/3\r (no-eol) (esc)
939 \r (no-eol) (esc)
940 \r (no-eol) (esc)
941 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
942 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
943 \r (no-eol) (esc)
944 \r (no-eol) (esc)
945 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
946 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
947 \r (no-eol) (esc)
948 \r (no-eol) (esc)
949 archiving [ ] 0/8\r (no-eol) (esc)
950 archiving [====> ] 1/8\r (no-eol) (esc)
951 archiving [=========> ] 2/8\r (no-eol) (esc)
952 archiving [===============> ] 3/8\r (no-eol) (esc)
953 archiving [====================> ] 4/8\r (no-eol) (esc)
954 archiving [=========================> ] 5/8\r (no-eol) (esc)
955 archiving [===============================> ] 6/8\r (no-eol) (esc)
956 archiving [====================================> ] 7/8\r (no-eol) (esc)
957 archiving [==========================================>] 8/8\r (no-eol) (esc)
958 \r (no-eol) (esc)
959 \r (no-eol) (esc)
960 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
961 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
962 \r (no-eol) (esc)
963 \r (no-eol) (esc)
964 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
965 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
966 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
967 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
968 \r (no-eol) (esc)
969 \r (no-eol) (esc)
970 archiving (sub3) [ ] 0/1\r (no-eol) (esc)
971 archiving (sub3) [===================================>] 1/1\r (no-eol) (esc)
972 \r (no-eol) (esc)
744 diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob)
973 diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob)
745 --- cloned.*/.hglf/b.dat * (glob)
974 --- cloned.*/.hglf/b.dat * (glob)
746 +++ cloned.*/.hglf/b.dat * (glob)
975 +++ cloned.*/.hglf/b.dat * (glob)
747 @@ -*,0 +1* @@ (glob)
976 @@ -*,0 +1* @@ (glob)
748 +da39a3ee5e6b4b0d3255bfef95601890afd80709
977 +da39a3ee5e6b4b0d3255bfef95601890afd80709
749 diff -Nru cloned.*/.hglf/foo/bar/large.dat cloned.*/.hglf/foo/bar/large.dat (glob)
978 diff -Nru cloned.*/.hglf/foo/bar/large.dat cloned.*/.hglf/foo/bar/large.dat (glob)
750 --- cloned.*/.hglf/foo/bar/large.dat * (glob)
979 --- cloned.*/.hglf/foo/bar/large.dat * (glob)
751 +++ cloned.*/.hglf/foo/bar/large.dat * (glob)
980 +++ cloned.*/.hglf/foo/bar/large.dat * (glob)
752 @@ -*,0 +1* @@ (glob)
981 @@ -*,0 +1* @@ (glob)
753 +2f6933b5ee0f5fdd823d9717d8729f3c2523811b
982 +2f6933b5ee0f5fdd823d9717d8729f3c2523811b
754 diff -Nru cloned.*/.hglf/large.bin cloned.*/.hglf/large.bin (glob)
983 diff -Nru cloned.*/.hglf/large.bin cloned.*/.hglf/large.bin (glob)
755 --- cloned.*/.hglf/large.bin * (glob)
984 --- cloned.*/.hglf/large.bin * (glob)
756 +++ cloned.*/.hglf/large.bin * (glob)
985 +++ cloned.*/.hglf/large.bin * (glob)
757 @@ -*,0 +1* @@ (glob)
986 @@ -*,0 +1* @@ (glob)
758 +7f7097b041ccf68cc5561e9600da4655d21c6d18
987 +7f7097b041ccf68cc5561e9600da4655d21c6d18
759 diff -Nru cloned.*/.hgsub cloned.*/.hgsub (glob)
988 diff -Nru cloned.*/.hgsub cloned.*/.hgsub (glob)
760 --- cloned.*/.hgsub * (glob)
989 --- cloned.*/.hgsub * (glob)
761 +++ cloned.*/.hgsub * (glob)
990 +++ cloned.*/.hgsub * (glob)
762 @@ -1* +1,2 @@ (glob)
991 @@ -1* +1,2 @@ (glob)
763 sub1 = ../sub1
992 sub1 = ../sub1
764 +sub3 = sub3
993 +sub3 = sub3
765 diff -Nru cloned.*/.hgsubstate cloned.*/.hgsubstate (glob)
994 diff -Nru cloned.*/.hgsubstate cloned.*/.hgsubstate (glob)
766 --- cloned.*/.hgsubstate * (glob)
995 --- cloned.*/.hgsubstate * (glob)
767 +++ cloned.*/.hgsubstate * (glob)
996 +++ cloned.*/.hgsubstate * (glob)
768 @@ -1* +1,2 @@ (glob)
997 @@ -1* +1,2 @@ (glob)
769 -fc3b4ce2696f7741438c79207583768f2ce6b0dd sub1
998 -fc3b4ce2696f7741438c79207583768f2ce6b0dd sub1
770 +7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
999 +7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
771 +b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
1000 +b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
772 diff -Nru cloned.*/foo/bar/def cloned.*/foo/bar/def (glob)
1001 diff -Nru cloned.*/foo/bar/def cloned.*/foo/bar/def (glob)
773 --- cloned.*/foo/bar/def * (glob)
1002 --- cloned.*/foo/bar/def * (glob)
774 +++ cloned.*/foo/bar/def * (glob)
1003 +++ cloned.*/foo/bar/def * (glob)
775 @@ -*,0 +1* @@ (glob)
1004 @@ -*,0 +1* @@ (glob)
776 +changed
1005 +changed
777 diff -Nru cloned.*/main cloned.*/main (glob)
1006 diff -Nru cloned.*/main cloned.*/main (glob)
778 --- cloned.*/main * (glob)
1007 --- cloned.*/main * (glob)
779 +++ cloned.*/main * (glob)
1008 +++ cloned.*/main * (glob)
780 @@ -1* +1* @@ (glob)
1009 @@ -1* +1* @@ (glob)
781 -main
1010 -main
782 +foo
1011 +foo
783 diff -Nru cloned.*/sub1/.hgsubstate cloned.*/sub1/.hgsubstate (glob)
1012 diff -Nru cloned.*/sub1/.hgsubstate cloned.*/sub1/.hgsubstate (glob)
784 --- cloned.*/sub1/.hgsubstate * (glob)
1013 --- cloned.*/sub1/.hgsubstate * (glob)
785 +++ cloned.*/sub1/.hgsubstate * (glob)
1014 +++ cloned.*/sub1/.hgsubstate * (glob)
786 @@ -1* +1* @@ (glob)
1015 @@ -1* +1* @@ (glob)
787 -c57a0840e3badd667ef3c3ef65471609acb2ba3c sub2
1016 -c57a0840e3badd667ef3c3ef65471609acb2ba3c sub2
788 +c77908c81ccea3794a896c79e98b0e004aee2e9e sub2
1017 +c77908c81ccea3794a896c79e98b0e004aee2e9e sub2
789 diff -Nru cloned.*/sub1/sub2/folder/test.txt cloned.*/sub1/sub2/folder/test.txt (glob)
1018 diff -Nru cloned.*/sub1/sub2/folder/test.txt cloned.*/sub1/sub2/folder/test.txt (glob)
790 --- cloned.*/sub1/sub2/folder/test.txt * (glob)
1019 --- cloned.*/sub1/sub2/folder/test.txt * (glob)
791 +++ cloned.*/sub1/sub2/folder/test.txt * (glob)
1020 +++ cloned.*/sub1/sub2/folder/test.txt * (glob)
792 @@ -*,0 +1* @@ (glob)
1021 @@ -*,0 +1* @@ (glob)
793 +subfolder
1022 +subfolder
794 diff -Nru cloned.*/sub1/sub2/sub2 cloned.*/sub1/sub2/sub2 (glob)
1023 diff -Nru cloned.*/sub1/sub2/sub2 cloned.*/sub1/sub2/sub2 (glob)
795 --- cloned.*/sub1/sub2/sub2 * (glob)
1024 --- cloned.*/sub1/sub2/sub2 * (glob)
796 +++ cloned.*/sub1/sub2/sub2 * (glob)
1025 +++ cloned.*/sub1/sub2/sub2 * (glob)
797 @@ -1* +1* @@ (glob)
1026 @@ -1* +1* @@ (glob)
798 -sub2
1027 -sub2
799 +modified
1028 +modified
800 diff -Nru cloned.*/sub3/a.txt cloned.*/sub3/a.txt (glob)
1029 diff -Nru cloned.*/sub3/a.txt cloned.*/sub3/a.txt (glob)
801 --- cloned.*/sub3/a.txt * (glob)
1030 --- cloned.*/sub3/a.txt * (glob)
802 +++ cloned.*/sub3/a.txt * (glob)
1031 +++ cloned.*/sub3/a.txt * (glob)
803 @@ -*,0 +1* @@ (glob)
1032 @@ -*,0 +1* @@ (glob)
804 +xyz
1033 +xyz
805 [1]
1034 [1]
806
1035
807 $ echo mod > sub1/sub2/sub2
1036 $ echo mod > sub1/sub2/sub2
808 $ hg --config extensions.extdiff= pdiff -S
1037 $ hg --config extensions.extdiff= pdiff -S
1038 \r (no-eol) (esc)
1039 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1040 \r (no-eol) (esc)
1041 \r (no-eol) (esc)
1042 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
1043 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
1044 \r (no-eol) (esc)
809 --- */cloned.*/sub1/sub2/sub2 * (glob)
1045 --- */cloned.*/sub1/sub2/sub2 * (glob)
810 +++ */cloned/sub1/sub2/sub2 * (glob)
1046 +++ */cloned/sub1/sub2/sub2 * (glob)
811 @@ -1* +1* @@ (glob)
1047 @@ -1* +1* @@ (glob)
812 -modified
1048 -modified
813 +mod
1049 +mod
814 [1]
1050 [1]
815
1051
816 $ cd ..
1052 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now