Debian Codegraph @

tests/test-subrepo-deep-nested-change.t

raw
1 $ cat >> $HGRCPATH <<EOF
2 > [extdiff]
3 > # for portability:
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
14 > EOF
15
16 Preparing the subrepository 'sub2'
17
18 $ hg init sub2
19 $ echo sub2 > sub2/sub2
20 $ hg add -R sub2
21 adding sub2/sub2
22 $ hg commit -R sub2 -m "sub2 import"
23
24 Preparing the 'sub1' repo which depends on the subrepo 'sub2'
25
26 $ hg init sub1
27 $ echo sub1 > sub1/sub1
28 $ echo "sub2 = ../sub2" > sub1/.hgsub
29 $ hg clone sub2 sub1/sub2
30 \r (no-eol) (esc)
31 linking [=====> ] 1/7\r (no-eol) (esc) (no-rust !)
32 linking [===========> ] 2/7\r (no-eol) (esc) (no-rust !)
33 linking [==================> ] 3/7\r (no-eol) (esc) (no-rust !)
34 linking [========================> ] 4/7\r (no-eol) (esc) (no-rust !)
35 linking [===============================> ] 5/7\r (no-eol) (esc) (no-rust !)
36 linking [=====================================> ] 6/7\r (no-eol) (esc) (no-rust !)
37 linking [============================================>] 7/7\r (no-eol) (esc) (no-rust !)
38 linking [====> ] 1/9\r (no-eol) (esc) (rust !)
39 linking [=========> ] 2/9\r (no-eol) (esc) (rust !)
40 linking [==============> ] 3/9\r (no-eol) (esc) (rust !)
41 linking [===================> ] 4/9\r (no-eol) (esc) (rust !)
42 linking [========================> ] 5/9\r (no-eol) (esc) (rust !)
43 linking [=============================> ] 6/9\r (no-eol) (esc) (rust !)
44 linking [==================================> ] 7/9\r (no-eol) (esc) (rust !)
45 linking [=======================================> ] 8/9\r (no-eol) (esc) (rust !)
46 linking [============================================>] 9/9\r (no-eol) (esc) (rust !)
47 \r (no-eol) (esc)
48 \r (no-eol) (esc) (no-rust !)
49 updating [===========================================>] 1/1\r (no-eol) (esc) (no-rust !)
50 \r (no-eol) (esc) (no-rust !)
51 updating to branch default
52 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
53 $ hg add -R sub1
54 adding sub1/.hgsub
55 adding sub1/sub1
56 $ hg commit -R sub1 -m "sub1 import"
57
58 Preparing the 'main' repo which depends on the subrepo 'sub1'
59
60 $ hg init main
61 $ echo main > main/main
62 $ echo "sub1 = ../sub1" > main/.hgsub
63
64 #if rust
65 $ hg clone sub1 main/sub1
66 \r (no-eol) (esc)
67 linking [==> ] 1/11\r (no-eol) (esc)
68 linking [======> ] 2/11\r (no-eol) (esc)
69 linking [==========> ] 3/11\r (no-eol) (esc)
70 linking [==============> ] 4/11\r (no-eol) (esc)
71 linking [==================> ] 5/11\r (no-eol) (esc)
72 linking [======================> ] 6/11\r (no-eol) (esc)
73 linking [==========================> ] 7/11\r (no-eol) (esc)
74 linking [==============================> ] 8/11\r (no-eol) (esc)
75 linking [==================================> ] 9/11\r (no-eol) (esc)
76 linking [======================================> ] 10/11\r (no-eol) (esc)
77 linking [==========================================>] 11/11\r (no-eol) (esc)
78 \r (no-eol) (esc)
79 \r (no-eol) (esc)
80 updating [===========================================>] 3/3\r (no-eol) (esc)
81 \r (no-eol) (esc)
82 \r (no-eol) (esc)
83 linking [====> ] 1/9\r (no-eol) (esc)
84 linking [=========> ] 2/9\r (no-eol) (esc)
85 linking [==============> ] 3/9\r (no-eol) (esc)
86 linking [===================> ] 4/9\r (no-eol) (esc)
87 linking [========================> ] 5/9\r (no-eol) (esc)
88 linking [=============================> ] 6/9\r (no-eol) (esc)
89 linking [==================================> ] 7/9\r (no-eol) (esc)
90 linking [=======================================> ] 8/9\r (no-eol) (esc)
91 linking [============================================>] 9/9\r (no-eol) (esc)
92 \r (no-eol) (esc)
93 updating to branch default
94 cloning subrepo sub2 from $TESTTMP/sub2
95 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
96 #else
97 $ hg clone sub1 main/sub1
98 \r (no-eol) (esc)
99 linking [====> ] 1/9\r (no-eol) (esc)
100 linking [=========> ] 2/9\r (no-eol) (esc)
101 linking [==============> ] 3/9\r (no-eol) (esc)
102 linking [===================> ] 4/9\r (no-eol) (esc)
103 linking [========================> ] 5/9\r (no-eol) (esc)
104 linking [=============================> ] 6/9\r (no-eol) (esc)
105 linking [==================================> ] 7/9\r (no-eol) (esc)
106 linking [=======================================> ] 8/9\r (no-eol) (esc)
107 linking [============================================>] 9/9\r (no-eol) (esc)
108 \r (no-eol) (esc)
109 \r (no-eol) (esc)
110 updating [===========================================>] 3/3\r (no-eol) (esc)
111 \r (no-eol) (esc)
112 \r (no-eol) (esc)
113 linking [=====> ] 1/7\r (no-eol) (esc)
114 linking [===========> ] 2/7\r (no-eol) (esc)
115 linking [==================> ] 3/7\r (no-eol) (esc)
116 linking [========================> ] 4/7\r (no-eol) (esc)
117 linking [===============================> ] 5/7\r (no-eol) (esc)
118 linking [=====================================> ] 6/7\r (no-eol) (esc)
119 linking [============================================>] 7/7\r (no-eol) (esc)
120 updating [===========================================>] 1/1\r (no-eol) (esc)
121 \r (no-eol) (esc)
122 updating to branch default
123 cloning subrepo sub2 from $TESTTMP/sub2
124 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
125 #endif
126 $ hg add -R main
127 adding main/.hgsub
128 adding main/main
129 $ hg commit -R main -m "main import"
130
131 #if serve
132
133 Unfortunately, subrepos not at their nominal location cannot be cloned. But
134 they are still served from their location within the local repository. The only
135 reason why 'main' can be cloned via the filesystem is because 'sub1' and 'sub2'
136 are also available as siblings of 'main'.
137
138 $ hg serve -R main --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
139 adding = $TESTTMP/main
140 adding sub1 = $TESTTMP/main/sub1
141 adding sub1/sub2 = $TESTTMP/main/sub1/sub2
142 listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?)
143 adding = $TESTTMP/main (?)
144 adding sub1 = $TESTTMP/main/sub1 (?)
145 adding sub1/sub2 = $TESTTMP/main/sub1/sub2 (?)
146 $ cat hg1.pid >> $DAEMON_PIDS
147
148 $ hg clone http://localhost:$HGPORT httpclone --config progress.disable=True
149 requesting all changes
150 adding changesets
151 adding manifests
152 adding file changes
153 added 1 changesets with 3 changes to 3 files
154 new changesets 7f491f53a367
155 updating to branch default
156 cloning subrepo sub1 from http://localhost:$HGPORT/../sub1
157 abort: HTTP Error 404: Not Found
158 [100]
159
160 $ cat access.log
161 * "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
162 * "GET /?cmd=batch HTTP/1.1" 200 - * (glob)
163 * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob)
164 * "GET /../sub1?cmd=capabilities HTTP/1.1" 404 - (glob)
165 $ cat error.log
166
167 $ killdaemons.py
168 $ rm hg1.pid error.log access.log
169 #endif
170
171 Cleaning both repositories, just as a clone -U
172
173 $ hg up -C -R sub2 null
174 \r (no-eol) (esc)
175 updating [===========================================>] 1/1\r (no-eol) (esc)
176 \r (no-eol) (esc)
177 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
178 $ hg up -C -R sub1 null
179 \r (no-eol) (esc)
180 updating [===========================================>] 1/1\r (no-eol) (esc)
181 \r (no-eol) (esc)
182 \r (no-eol) (esc)
183 updating [===========================================>] 3/3\r (no-eol) (esc)
184 \r (no-eol) (esc)
185 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
186 $ hg up -C -R main null
187 \r (no-eol) (esc)
188 updating [===========================================>] 1/1\r (no-eol) (esc)
189 \r (no-eol) (esc)
190 \r (no-eol) (esc)
191 updating [===========================================>] 3/3\r (no-eol) (esc)
192 \r (no-eol) (esc)
193 \r (no-eol) (esc)
194 updating [===========================================>] 3/3\r (no-eol) (esc)
195 \r (no-eol) (esc)
196 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
197 $ rm -rf main/sub1
198 $ rm -rf sub1/sub2
199
200 Clone main
201
202 #if rust
203 $ hg --config extensions.largefiles= clone main cloned
204 \r (no-eol) (esc)
205 linking [====> ] 1/9\r (no-eol) (esc) (no-rust !)
206 linking [=========> ] 2/9\r (no-eol) (esc) (no-rust !)
207 linking [==============> ] 3/9\r (no-eol) (esc) (no-rust !)
208 linking [===================> ] 4/9\r (no-eol) (esc) (no-rust !)
209 linking [========================> ] 5/9\r (no-eol) (esc) (no-rust !)
210 linking [=============================> ] 6/9\r (no-eol) (esc) (no-rust !)
211 linking [==================================> ] 7/9\r (no-eol) (esc) (no-rust !)
212 linking [=======================================> ] 8/9\r (no-eol) (esc) (no-rust !)
213 linking [============================================>] 9/9\r (no-eol) (esc) (no-rust !)
214 linking [==> ] 1/11\r (no-eol) (esc) (rust !)
215 linking [======> ] 2/11\r (no-eol) (esc) (rust !)
216 linking [==========> ] 3/11\r (no-eol) (esc) (rust !)
217 linking [==============> ] 4/11\r (no-eol) (esc) (rust !)
218 linking [==================> ] 5/11\r (no-eol) (esc) (rust !)
219 linking [======================> ] 6/11\r (no-eol) (esc) (rust !)
220 linking [==========================> ] 7/11\r (no-eol) (esc) (rust !)
221 linking [==============================> ] 8/11\r (no-eol) (esc) (rust !)
222 linking [==================================> ] 9/11\r (no-eol) (esc) (rust !)
223 linking [======================================> ] 10/11\r (no-eol) (esc) (rust !)
224 linking [==========================================>] 11/11\r (no-eol) (esc) (rust !)
225 \r (no-eol) (esc)
226 \r (no-eol) (esc)
227 updating [===========================================>] 3/3\r (no-eol) (esc)
228 \r (no-eol) (esc)
229 \r (no-eol) (esc)
230 linking [==> ] 1/11\r (no-eol) (esc)
231 linking [======> ] 2/11\r (no-eol) (esc)
232 linking [==========> ] 3/11\r (no-eol) (esc)
233 linking [==============> ] 4/11\r (no-eol) (esc)
234 linking [==================> ] 5/11\r (no-eol) (esc)
235 linking [======================> ] 6/11\r (no-eol) (esc)
236 linking [==========================> ] 7/11\r (no-eol) (esc)
237 linking [==============================> ] 8/11\r (no-eol) (esc)
238 linking [==================================> ] 9/11\r (no-eol) (esc)
239 linking [======================================> ] 10/11\r (no-eol) (esc)
240 linking [==========================================>] 11/11\r (no-eol) (esc)
241 updating [===========================================>] 3/3\r (no-eol) (esc)
242 \r (no-eol) (esc)
243 \r (no-eol) (esc)
244 linking [====> ] 1/9\r (no-eol) (esc)
245 linking [=========> ] 2/9\r (no-eol) (esc)
246 linking [==============> ] 3/9\r (no-eol) (esc)
247 linking [===================> ] 4/9\r (no-eol) (esc)
248 linking [========================> ] 5/9\r (no-eol) (esc)
249 linking [=============================> ] 6/9\r (no-eol) (esc)
250 linking [==================================> ] 7/9\r (no-eol) (esc)
251 linking [=======================================> ] 8/9\r (no-eol) (esc)
252 linking [============================================>] 9/9\r (no-eol) (esc)
253 updating [===========================================>] 1/1\r (no-eol) (esc)
254 \r (no-eol) (esc)
255 updating to branch default
256 cloning subrepo sub1 from $TESTTMP/sub1
257 cloning subrepo sub1/sub2 from $TESTTMP/sub2
258 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
259 #else
260 $ hg --config extensions.largefiles= clone main cloned
261 \r (no-eol) (esc)
262 linking [====> ] 1/9\r (no-eol) (esc)
263 linking [=========> ] 2/9\r (no-eol) (esc)
264 linking [==============> ] 3/9\r (no-eol) (esc)
265 linking [===================> ] 4/9\r (no-eol) (esc)
266 linking [========================> ] 5/9\r (no-eol) (esc)
267 linking [=============================> ] 6/9\r (no-eol) (esc)
268 linking [==================================> ] 7/9\r (no-eol) (esc)
269 linking [=======================================> ] 8/9\r (no-eol) (esc)
270 linking [============================================>] 9/9\r (no-eol) (esc)
271 \r (no-eol) (esc)
272 \r (no-eol) (esc)
273 updating [===========================================>] 3/3\r (no-eol) (esc)
274 \r (no-eol) (esc)
275 \r (no-eol) (esc)
276 linking [====> ] 1/9\r (no-eol) (esc)
277 linking [=========> ] 2/9\r (no-eol) (esc)
278 linking [==============> ] 3/9\r (no-eol) (esc)
279 linking [===================> ] 4/9\r (no-eol) (esc)
280 linking [========================> ] 5/9\r (no-eol) (esc)
281 linking [=============================> ] 6/9\r (no-eol) (esc)
282 linking [==================================> ] 7/9\r (no-eol) (esc)
283 linking [=======================================> ] 8/9\r (no-eol) (esc)
284 linking [============================================>] 9/9\r (no-eol) (esc)
285 updating [===========================================>] 3/3\r (no-eol) (esc)
286 \r (no-eol) (esc)
287 \r (no-eol) (esc)
288 linking [=====> ] 1/7\r (no-eol) (esc)
289 linking [===========> ] 2/7\r (no-eol) (esc)
290 linking [==================> ] 3/7\r (no-eol) (esc)
291 linking [========================> ] 4/7\r (no-eol) (esc)
292 linking [===============================> ] 5/7\r (no-eol) (esc)
293 linking [=====================================> ] 6/7\r (no-eol) (esc)
294 linking [============================================>] 7/7\r (no-eol) (esc)
295 updating [===========================================>] 1/1\r (no-eol) (esc)
296 \r (no-eol) (esc)
297 updating to branch default
298 cloning subrepo sub1 from $TESTTMP/sub1
299 cloning subrepo sub1/sub2 from $TESTTMP/sub2
300 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
301 #endif
302
303 Largefiles is NOT enabled in the clone if the source repo doesn't require it
304 $ hg debugrequires -R cloned | grep largefiles
305 [1]
306
307 Checking cloned repo ids
308
309 $ printf "cloned " ; hg id -R cloned
310 cloned 7f491f53a367 tip
311 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
312 cloned/sub1 fc3b4ce2696f tip
313 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
314 cloned/sub1/sub2 c57a0840e3ba tip
315
316 debugsub output for main and sub1
317
318 $ hg debugsub -R cloned
319 path sub1
320 source ../sub1
321 revision fc3b4ce2696f7741438c79207583768f2ce6b0dd
322 $ hg debugsub -R cloned/sub1
323 path sub2
324 source ../sub2
325 revision c57a0840e3badd667ef3c3ef65471609acb2ba3c
326
327 Modifying deeply nested 'sub2'
328
329 $ echo modified > cloned/sub1/sub2/sub2
330 $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned
331 committing subrepository sub1
332 committing subrepository sub1/sub2
333
334 Checking modified node ids
335
336 $ printf "cloned " ; hg id -R cloned
337 cloned ffe6649062fe tip
338 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
339 cloned/sub1 2ecb03bf44a9 tip
340 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
341 cloned/sub1/sub2 53dd3430bcaf tip
342
343 debugsub output for main and sub1
344
345 $ hg debugsub -R cloned
346 path sub1
347 source ../sub1
348 revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9
349 $ hg debugsub -R cloned/sub1
350 path sub2
351 source ../sub2
352 revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
353
354 Check that deep archiving works
355
356 $ cd cloned
357 $ echo 'test' > sub1/sub2/test.txt
358 $ hg --config extensions.largefiles=! add sub1/sub2/test.txt
359 $ mkdir sub1/sub2/folder
360 $ echo 'subfolder' > sub1/sub2/folder/test.txt
361 $ hg ci -ASm "add test.txt"
362 adding sub1/sub2/folder/test.txt
363 committing subrepository sub1
364 committing subrepository sub1/sub2
365
366 $ rm -r main
367 $ hg archive -S -qr 'wdir()' ../wdir
368 $ cat ../wdir/.hg_archival.txt
369 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
370 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
371 branch: default
372 latesttag: null
373 latesttagdistance: 4
374 changessincelatesttag: 4
375 $ hg update -Cq .
376
377 A deleted subrepo file is flagged as dirty, like the top level repo
378
379 $ rm -r ../wdir sub1/sub2/folder/test.txt
380 $ hg archive -S -qr 'wdir()' ../wdir
381 $ cat ../wdir/.hg_archival.txt
382 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
383 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
384 branch: default
385 latesttag: null
386 latesttagdistance: 4
387 changessincelatesttag: 4
388 $ hg update -Cq .
389 $ rm -r ../wdir
390
391 $ hg archive -S -qr 'wdir()' ../wdir \
392 > --config 'experimental.archivemetatemplate=archived {node|short}\n'
393 $ cat ../wdir/.hg_archival.txt
394 archived ffffffffffff
395 $ rm -r ../wdir
396
397 .. but first take a detour through some deep removal testing
398
399 $ hg remove -S -I 're:.*.txt' .
400 \r (no-eol) (esc)
401 searching [==========================================>] 1/1\r (no-eol) (esc)
402 searching [==========================================>] 1/1\r (no-eol) (esc)
403 \r (no-eol) (esc)
404 \r (no-eol) (esc)
405 deleting [=====================> ] 1/2\r (no-eol) (esc)
406 \r (no-eol) (esc)
407 \r (no-eol) (esc)
408 deleting [===========================================>] 2/2\r (no-eol) (esc)
409 \r (no-eol) (esc)
410 removing sub1/sub2/folder/test.txt
411 removing sub1/sub2/test.txt
412 $ hg status -S
413 R sub1/sub2/folder/test.txt
414 R sub1/sub2/test.txt
415 $ hg update -Cq
416 $ hg remove -I 're:.*.txt' sub1
417 \r (no-eol) (esc)
418 searching [==========================================>] 1/1\r (no-eol) (esc)
419 \r (no-eol) (esc)
420 \r (no-eol) (esc)
421 deleting [===========================================>] 1/1\r (no-eol) (esc)
422 \r (no-eol) (esc)
423 $ hg status -S
424 $ hg remove sub1/sub2/folder/test.txt
425 \r (no-eol) (esc)
426 searching [==========================================>] 1/1\r (no-eol) (esc)
427 searching [==========================================>] 1/1\r (no-eol) (esc)
428 \r (no-eol) (esc)
429 \r (no-eol) (esc)
430 deleting [===========================================>] 1/1\r (no-eol) (esc)
431 \r (no-eol) (esc)
432 \r (no-eol) (esc)
433 deleting [===========================================>] 1/1\r (no-eol) (esc)
434 \r (no-eol) (esc)
435 \r (no-eol) (esc)
436 deleting [===========================================>] 1/1\r (no-eol) (esc)
437 \r (no-eol) (esc)
438 $ hg remove sub1/.hgsubstate
439 \r (no-eol) (esc)
440 searching [==========================================>] 1/1\r (no-eol) (esc)
441 \r (no-eol) (esc)
442 \r (no-eol) (esc)
443 deleting [===========================================>] 1/1\r (no-eol) (esc)
444 \r (no-eol) (esc)
445 \r (no-eol) (esc)
446 deleting [===========================================>] 1/1\r (no-eol) (esc)
447 \r (no-eol) (esc)
448 $ mv sub1/.hgsub sub1/x.hgsub
449 $ hg status -S
450 warning: subrepo spec file 'sub1/.hgsub' not found
451 R sub1/.hgsubstate
452 R sub1/sub2/folder/test.txt
453 ! sub1/.hgsub
454 ? sub1/x.hgsub
455 $ hg status -R sub1
456 warning: subrepo spec file 'sub1/.hgsub' not found
457 R .hgsubstate
458 ! .hgsub
459 ? x.hgsub
460 $ mv sub1/x.hgsub sub1/.hgsub
461 $ hg update -Cq
462 $ touch sub1/foo
463 $ hg forget sub1/sub2/folder/test.txt
464 $ rm sub1/sub2/test.txt
465
466 Test relative path printing + subrepos
467 $ mkdir -p foo/bar
468 $ cd foo
469 $ touch bar/abc
470 $ hg addremove -S ..
471 \r (no-eol) (esc)
472 searching for exact renames [========================>] 1/1\r (no-eol) (esc)
473 \r (no-eol) (esc)
474 adding ../sub1/sub2/folder/test.txt
475 removing ../sub1/sub2/test.txt
476 adding ../sub1/foo
477 adding bar/abc
478 $ cd ..
479 $ hg status -S
480 A foo/bar/abc
481 A sub1/foo
482 R sub1/sub2/test.txt
483
484 Archive wdir() with subrepos
485 $ hg rm main
486 \r (no-eol) (esc)
487 deleting [===========================================>] 1/1\r (no-eol) (esc)
488 \r (no-eol) (esc)
489 $ hg archive -S -r 'wdir()' ../wdir
490 \r (no-eol) (esc)
491 archiving [ ] 0/3\r (no-eol) (esc)
492 archiving [=============> ] 1/3\r (no-eol) (esc)
493 archiving [===========================> ] 2/3\r (no-eol) (esc)
494 archiving [==========================================>] 3/3\r (no-eol) (esc)
495 \r (no-eol) (esc)
496 \r (no-eol) (esc)
497 archiving (sub1) [ ] 0/4\r (no-eol) (esc)
498 archiving (sub1) [========> ] 1/4\r (no-eol) (esc)
499 archiving (sub1) [=================> ] 2/4\r (no-eol) (esc)
500 archiving (sub1) [==========================> ] 3/4\r (no-eol) (esc)
501 archiving (sub1) [===================================>] 4/4\r (no-eol) (esc)
502 \r (no-eol) (esc)
503 \r (no-eol) (esc)
504 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
505 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
506 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
507 \r (no-eol) (esc)
508 $ diff -r . ../wdir | grep -E -v '\.hg$|^Common subdirectories:'
509 Only in ../wdir: .hg_archival.txt
510
511 $ find ../wdir -type f | sort
512 ../wdir/.hg_archival.txt
513 ../wdir/.hgsub
514 ../wdir/.hgsubstate
515 ../wdir/foo/bar/abc
516 ../wdir/sub1/.hgsub
517 ../wdir/sub1/.hgsubstate
518 ../wdir/sub1/foo
519 ../wdir/sub1/sub1
520 ../wdir/sub1/sub2/folder/test.txt
521 ../wdir/sub1/sub2/sub2
522
523 $ cat ../wdir/.hg_archival.txt
524 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
525 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
526 branch: default
527 latesttag: null
528 latesttagdistance: 4
529 changessincelatesttag: 4
530
531 Attempting to archive 'wdir()' with a missing file is handled gracefully
532 $ rm sub1/sub1
533 $ rm -r ../wdir
534 $ hg archive -v -S -r 'wdir()' ../wdir
535 \r (no-eol) (esc)
536 archiving [ ] 0/3\r (no-eol) (esc)
537 archiving [=============> ] 1/3\r (no-eol) (esc)
538 archiving [===========================> ] 2/3\r (no-eol) (esc)
539 archiving [==========================================>] 3/3\r (no-eol) (esc)
540 \r (no-eol) (esc)
541 \r (no-eol) (esc)
542 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
543 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
544 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
545 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
546 \r (no-eol) (esc)
547 \r (no-eol) (esc)
548 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
549 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
550 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
551 \r (no-eol) (esc)
552 $ find ../wdir -type f | sort
553 ../wdir/.hg_archival.txt
554 ../wdir/.hgsub
555 ../wdir/.hgsubstate
556 ../wdir/foo/bar/abc
557 ../wdir/sub1/.hgsub
558 ../wdir/sub1/.hgsubstate
559 ../wdir/sub1/foo
560 ../wdir/sub1/sub2/folder/test.txt
561 ../wdir/sub1/sub2/sub2
562
563 Continue relative path printing + subrepos
564 $ hg update -Cq
565 $ rm -r ../wdir
566 $ hg archive -S -r 'wdir()' ../wdir
567 \r (no-eol) (esc)
568 archiving [ ] 0/3\r (no-eol) (esc)
569 archiving [=============> ] 1/3\r (no-eol) (esc)
570 archiving [===========================> ] 2/3\r (no-eol) (esc)
571 archiving [==========================================>] 3/3\r (no-eol) (esc)
572 \r (no-eol) (esc)
573 \r (no-eol) (esc)
574 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
575 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
576 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
577 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
578 \r (no-eol) (esc)
579 \r (no-eol) (esc)
580 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
581 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
582 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
583 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
584 \r (no-eol) (esc)
585 $ cat ../wdir/.hg_archival.txt
586 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
587 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd
588 branch: default
589 latesttag: null
590 latesttagdistance: 4
591 changessincelatesttag: 4
592
593 $ touch sub1/sub2/folder/bar
594 $ hg addremove sub1/sub2
595 adding sub1/sub2/folder/bar
596 $ hg status -S
597 A sub1/sub2/folder/bar
598 ? foo/bar/abc
599 ? sub1/foo
600 $ hg update -Cq
601 $ hg addremove sub1
602 adding sub1/sub2/folder/bar
603 adding sub1/foo
604 $ hg update -Cq
605 $ rm sub1/sub2/folder/test.txt
606 $ rm sub1/sub2/test.txt
607 $ hg ci -ASm "remove test.txt"
608 adding sub1/sub2/folder/bar
609 removing sub1/sub2/folder/test.txt
610 removing sub1/sub2/test.txt
611 adding sub1/foo
612 adding foo/bar/abc
613 committing subrepository sub1
614 committing subrepository sub1/sub2
615
616 $ hg forget sub1/sub2/sub2
617 $ echo x > sub1/sub2/x.txt
618 $ hg add sub1/sub2/x.txt
619
620 Files sees uncommitted adds and removes in subrepos
621 $ hg files -S
622 .hgsub
623 .hgsubstate
624 foo/bar/abc
625 main
626 sub1/.hgsub
627 sub1/.hgsubstate
628 sub1/foo
629 sub1/sub1
630 sub1/sub2/folder/bar
631 sub1/sub2/x.txt
632
633 $ hg files -S "set:eol('dos') or eol('unix') or size('<= 0')"
634 .hgsub
635 .hgsubstate
636 foo/bar/abc
637 main
638 sub1/.hgsub
639 sub1/.hgsubstate
640 sub1/foo
641 sub1/sub1
642 sub1/sub2/folder/bar
643 sub1/sub2/x.txt
644
645 $ hg files -r '.^' -S "set:eol('dos') or eol('unix')"
646 .hgsub
647 .hgsubstate
648 main
649 sub1/.hgsub
650 sub1/.hgsubstate
651 sub1/sub1
652 sub1/sub2/folder/test.txt
653 sub1/sub2/sub2
654 sub1/sub2/test.txt
655
656 $ hg files sub1
657 sub1/.hgsub
658 sub1/.hgsubstate
659 sub1/foo
660 sub1/sub1
661 sub1/sub2/folder/bar
662 sub1/sub2/x.txt
663
664 $ hg files sub1/sub2
665 sub1/sub2/folder/bar
666 sub1/sub2/x.txt
667
668 $ hg files
669 .hgsub
670 .hgsubstate
671 foo/bar/abc
672 main
673
674 $ hg files -S -r '.^' sub1/sub2/folder
675 sub1/sub2/folder/test.txt
676
677 $ hg files -S -r '.^' sub1/sub2/missing
678 sub1/sub2/missing: no such file in rev 78026e779ea6
679 [1]
680
681 $ hg files -r '.^' sub1/
682 sub1/.hgsub
683 sub1/.hgsubstate
684 sub1/sub1
685 sub1/sub2/folder/test.txt
686 sub1/sub2/sub2
687 sub1/sub2/test.txt
688
689 $ hg files -r '.^' sub1/sub2
690 sub1/sub2/folder/test.txt
691 sub1/sub2/sub2
692 sub1/sub2/test.txt
693
694 $ hg rollback -q
695 $ hg up -Cq
696
697 $ hg --config extensions.largefiles=! archive -S ../archive_all
698 \r (no-eol) (esc)
699 archiving [ ] 0/3\r (no-eol) (esc)
700 archiving [=============> ] 1/3\r (no-eol) (esc)
701 archiving [===========================> ] 2/3\r (no-eol) (esc)
702 archiving [==========================================>] 3/3\r (no-eol) (esc)
703 \r (no-eol) (esc)
704 \r (no-eol) (esc)
705 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
706 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
707 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
708 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
709 \r (no-eol) (esc)
710 \r (no-eol) (esc)
711 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
712 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
713 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
714 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
715 \r (no-eol) (esc)
716 $ find ../archive_all | sort
717 ../archive_all
718 ../archive_all/.hg_archival.txt
719 ../archive_all/.hgsub
720 ../archive_all/.hgsubstate
721 ../archive_all/main
722 ../archive_all/sub1
723 ../archive_all/sub1/.hgsub
724 ../archive_all/sub1/.hgsubstate
725 ../archive_all/sub1/sub1
726 ../archive_all/sub1/sub2
727 ../archive_all/sub1/sub2/folder
728 ../archive_all/sub1/sub2/folder/test.txt
729 ../archive_all/sub1/sub2/sub2
730 ../archive_all/sub1/sub2/test.txt
731
732 Check that archive -X works in deep subrepos
733
734 $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude
735 \r (no-eol) (esc)
736 archiving [ ] 0/3\r (no-eol) (esc)
737 archiving [=============> ] 1/3\r (no-eol) (esc)
738 archiving [===========================> ] 2/3\r (no-eol) (esc)
739 archiving [==========================================>] 3/3\r (no-eol) (esc)
740 \r (no-eol) (esc)
741 \r (no-eol) (esc)
742 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
743 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
744 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
745 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
746 \r (no-eol) (esc)
747 \r (no-eol) (esc)
748 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
749 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
750 \r (no-eol) (esc)
751 $ find ../archive_exclude | sort
752 ../archive_exclude
753 ../archive_exclude/.hg_archival.txt
754 ../archive_exclude/.hgsub
755 ../archive_exclude/.hgsubstate
756 ../archive_exclude/main
757 ../archive_exclude/sub1
758 ../archive_exclude/sub1/.hgsub
759 ../archive_exclude/sub1/.hgsubstate
760 ../archive_exclude/sub1/sub1
761 ../archive_exclude/sub1/sub2
762 ../archive_exclude/sub1/sub2/sub2
763
764 $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include
765 \r (no-eol) (esc)
766 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
767 \r (no-eol) (esc)
768 \r (no-eol) (esc)
769 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
770 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
771 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
772 \r (no-eol) (esc)
773 $ find ../archive_include | sort
774 ../archive_include
775 ../archive_include/sub1
776 ../archive_include/sub1/sub2
777 ../archive_include/sub1/sub2/folder
778 ../archive_include/sub1/sub2/folder/test.txt
779 ../archive_include/sub1/sub2/test.txt
780
781 Check that deep archive works with largefiles (which overrides hgsubrepo impl)
782 This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo
783 subrepos are archived properly.
784 Note that add --large through a subrepo currently adds the file as a normal file
785
786 $ echo "large" > sub1/sub2/large.bin
787 $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin
788 $ echo "large" > large.bin
789 $ hg --config extensions.largefiles= add --large large.bin
790 $ hg --config extensions.largefiles= ci -S -m "add large files"
791 committing subrepository sub1
792 committing subrepository sub1/sub2
793
794 $ hg --config extensions.largefiles= archive -S ../archive_lf
795 $ find ../archive_lf | sort
796 ../archive_lf
797 ../archive_lf/.hg_archival.txt
798 ../archive_lf/.hgsub
799 ../archive_lf/.hgsubstate
800 ../archive_lf/large.bin
801 ../archive_lf/main
802 ../archive_lf/sub1
803 ../archive_lf/sub1/.hgsub
804 ../archive_lf/sub1/.hgsubstate
805 ../archive_lf/sub1/sub1
806 ../archive_lf/sub1/sub2
807 ../archive_lf/sub1/sub2/folder
808 ../archive_lf/sub1/sub2/folder/test.txt
809 ../archive_lf/sub1/sub2/large.bin
810 ../archive_lf/sub1/sub2/sub2
811 ../archive_lf/sub1/sub2/test.txt
812 $ rm -rf ../archive_lf
813
814 Exclude large files from main and sub-sub repo
815
816 $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf
817 $ find ../archive_lf | sort
818 ../archive_lf
819 ../archive_lf/.hg_archival.txt
820 ../archive_lf/.hgsub
821 ../archive_lf/.hgsubstate
822 ../archive_lf/main
823 ../archive_lf/sub1
824 ../archive_lf/sub1/.hgsub
825 ../archive_lf/sub1/.hgsubstate
826 ../archive_lf/sub1/sub1
827 ../archive_lf/sub1/sub2
828 ../archive_lf/sub1/sub2/folder
829 ../archive_lf/sub1/sub2/folder/test.txt
830 ../archive_lf/sub1/sub2/sub2
831 ../archive_lf/sub1/sub2/test.txt
832 $ rm -rf ../archive_lf
833
834 Exclude normal files from main and sub-sub repo
835
836 $ hg --config extensions.largefiles= archive -S -X '**.txt' -p '.' ../archive_lf.tgz
837 $ tar -tzf ../archive_lf.tgz | sort
838 .hgsub
839 .hgsubstate
840 large.bin
841 main
842 sub1/.hgsub
843 sub1/.hgsubstate
844 sub1/sub1
845 sub1/sub2/large.bin
846 sub1/sub2/sub2
847
848 Include normal files from within a largefiles subrepo
849
850 $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf
851 $ find ../archive_lf | sort
852 ../archive_lf
853 ../archive_lf/.hg_archival.txt
854 ../archive_lf/sub1
855 ../archive_lf/sub1/sub2
856 ../archive_lf/sub1/sub2/folder
857 ../archive_lf/sub1/sub2/folder/test.txt
858 ../archive_lf/sub1/sub2/test.txt
859 $ rm -rf ../archive_lf
860
861 Include large files from within a largefiles subrepo
862
863 $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf
864 $ find ../archive_lf | sort
865 ../archive_lf
866 ../archive_lf/large.bin
867 ../archive_lf/sub1
868 ../archive_lf/sub1/sub2
869 ../archive_lf/sub1/sub2/large.bin
870 $ rm -rf ../archive_lf
871
872 Find an exact largefile match in a largefiles subrepo
873
874 $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf
875 $ find ../archive_lf | sort
876 ../archive_lf
877 ../archive_lf/sub1
878 ../archive_lf/sub1/sub2
879 ../archive_lf/sub1/sub2/large.bin
880 $ rm -rf ../archive_lf
881
882 The local repo enables largefiles if a largefiles repo is cloned
883
884 $ hg showconfig extensions
885 extensions.largefiles=
886
887 $ hg --config extensions.largefiles= clone -qU . ../lfclone
888 $ hg debugrequires -R ../lfclone | grep largefiles
889 largefiles
890
891 Find an exact match to a standin (should archive nothing)
892 $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf
893 $ find ../archive_lf 2> /dev/null | sort
894
895 $ cat >> $HGRCPATH <<EOF
896 > [extensions]
897 > largefiles=
898 > [largefiles]
899 > patterns=glob:**.dat
900 > EOF
901
902 Test forget through a deep subrepo with the largefiles extension, both a
903 largefile and a normal file. Then a largefile that hasn't been committed yet.
904 $ touch sub1/sub2/untracked.txt
905 $ touch sub1/sub2/large.dat
906 $ hg forget sub1/sub2/large.bin sub1/sub2/test.txt sub1/sub2/untracked.txt
907 not removing sub1/sub2/untracked.txt: file is already untracked
908 [1]
909 $ hg add --large --dry-run -v sub1/sub2/untracked.txt
910 adding sub1/sub2/untracked.txt as a largefile
911 $ hg add --large -v sub1/sub2/untracked.txt
912 adding sub1/sub2/untracked.txt as a largefile
913 $ hg add --normal -v sub1/sub2/large.dat
914 adding sub1/sub2/large.dat
915 $ hg forget -v sub1/sub2/untracked.txt
916 removing sub1/sub2/untracked.txt
917 $ hg status -S
918 A sub1/sub2/large.dat
919 R sub1/sub2/large.bin
920 R sub1/sub2/test.txt
921 ? foo/bar/abc
922 ? sub1/sub2/untracked.txt
923 ? sub1/sub2/x.txt
924 $ hg add sub1/sub2
925
926 $ hg archive -S -r 'wdir()' ../wdir2
927 $ diff -r . ../wdir2 | grep -E -v '\.hg$|^Common subdirectories:'
928 Only in ../wdir2: .hg_archival.txt
929 Only in .: .hglf
930 Only in .: foo
931 Only in ./sub1/sub2: large.bin
932 Only in ./sub1/sub2: test.txt
933 Only in ./sub1/sub2: untracked.txt
934 Only in ./sub1/sub2: x.txt
935 $ find ../wdir2 -type f | sort
936 ../wdir2/.hg_archival.txt
937 ../wdir2/.hgsub
938 ../wdir2/.hgsubstate
939 ../wdir2/large.bin
940 ../wdir2/main
941 ../wdir2/sub1/.hgsub
942 ../wdir2/sub1/.hgsubstate
943 ../wdir2/sub1/sub1
944 ../wdir2/sub1/sub2/folder/test.txt
945 ../wdir2/sub1/sub2/large.dat
946 ../wdir2/sub1/sub2/sub2
947 $ hg status -S -mac -n | sort
948 .hgsub
949 .hgsubstate
950 large.bin
951 main
952 sub1/.hgsub
953 sub1/.hgsubstate
954 sub1/sub1
955 sub1/sub2/folder/test.txt
956 sub1/sub2/large.dat
957 sub1/sub2/sub2
958
959 $ hg ci -Sqm 'forget testing'
960
961 Test 'wdir()' modified file archiving with largefiles
962 $ echo 'mod' > main
963 $ echo 'mod' > large.bin
964 $ echo 'mod' > sub1/sub2/large.dat
965 $ hg archive -S -r 'wdir()' ../wdir3
966 $ diff -r . ../wdir3 | grep -E -v '\.hg$|^Common subdirectories'
967 Only in ../wdir3: .hg_archival.txt
968 Only in .: .hglf
969 Only in .: foo
970 Only in ./sub1/sub2: large.bin
971 Only in ./sub1/sub2: test.txt
972 Only in ./sub1/sub2: untracked.txt
973 Only in ./sub1/sub2: x.txt
974 $ find ../wdir3 -type f | sort
975 ../wdir3/.hg_archival.txt
976 ../wdir3/.hgsub
977 ../wdir3/.hgsubstate
978 ../wdir3/large.bin
979 ../wdir3/main
980 ../wdir3/sub1/.hgsub
981 ../wdir3/sub1/.hgsubstate
982 ../wdir3/sub1/sub1
983 ../wdir3/sub1/sub2/folder/test.txt
984 ../wdir3/sub1/sub2/large.dat
985 ../wdir3/sub1/sub2/sub2
986 $ hg up -Cq
987
988 Test issue4330: commit a directory where only normal files have changed
989 $ touch foo/bar/large.dat
990 $ hg add --large foo/bar/large.dat
991 $ hg ci -m 'add foo/bar/large.dat'
992 $ touch a.txt
993 $ touch a.dat
994 $ hg add -v foo/bar/abc a.txt a.dat
995 adding a.dat as a largefile
996 adding a.txt
997 adding foo/bar/abc
998 $ hg ci -m 'dir commit with only normal file deltas' foo/bar
999 $ hg status
1000 A a.dat
1001 A a.txt
1002
1003 Test a directory commit with a changed largefile and a changed normal file
1004 $ echo changed > foo/bar/large.dat
1005 $ echo changed > foo/bar/abc
1006 $ hg ci -m 'dir commit with normal and lf file deltas' foo
1007 $ hg status
1008 A a.dat
1009 A a.txt
1010
1011 $ hg ci -m "add a.*"
1012 $ hg mv a.dat b.dat
1013 $ hg mv foo/bar/abc foo/bar/def
1014 $ hg status -C
1015 A b.dat
1016 a.dat
1017 A foo/bar/def
1018 foo/bar/abc
1019 R a.dat
1020 R foo/bar/abc
1021
1022 $ hg ci -m "move large and normal"
1023 $ hg status -C --rev '.^' --rev .
1024 A b.dat
1025 a.dat
1026 A foo/bar/def
1027 foo/bar/abc
1028 R a.dat
1029 R foo/bar/abc
1030
1031
1032 $ echo foo > main
1033 $ hg ci -m "mod parent only"
1034 $ hg init sub3
1035 $ echo "sub3 = sub3" >> .hgsub
1036 $ echo xyz > sub3/a.txt
1037 $ hg add sub3/a.txt
1038 $ hg ci -Sm "add sub3"
1039 committing subrepository sub3
1040 $ cat .hgsub | grep -v sub3 > .hgsub1
1041 $ mv .hgsub1 .hgsub
1042 $ hg ci -m "remove sub3"
1043
1044 $ hg log -r "subrepo()" --style compact
1045 0 7f491f53a367 1970-01-01 00:00 +0000 test
1046 main import
1047
1048 1 ffe6649062fe 1970-01-01 00:00 +0000 test
1049 deep nested modif should trigger a commit
1050
1051 2 9bb10eebee29 1970-01-01 00:00 +0000 test
1052 add test.txt
1053
1054 3 7c64f035294f 1970-01-01 00:00 +0000 test
1055 add large files
1056
1057 4 f734a59e2e35 1970-01-01 00:00 +0000 test
1058 forget testing
1059
1060 11 9685a22af5db 1970-01-01 00:00 +0000 test
1061 add sub3
1062
1063 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
1064 remove sub3
1065
1066 $ hg log -r "subrepo('sub3')" --style compact
1067 11 9685a22af5db 1970-01-01 00:00 +0000 test
1068 add sub3
1069
1070 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
1071 remove sub3
1072
1073 $ hg log -r "subrepo('bogus')" --style compact
1074
1075
1076 Test .hgsubstate in the R state
1077
1078 $ hg rm .hgsub .hgsubstate
1079 \r (no-eol) (esc)
1080 deleting [=====================> ] 1/2\r (no-eol) (esc)
1081 deleting [===========================================>] 2/2\r (no-eol) (esc)
1082 \r (no-eol) (esc)
1083 $ hg ci -m 'trash subrepo tracking'
1084
1085 $ hg log -r "subrepo('re:sub\d+')" --style compact
1086 0 7f491f53a367 1970-01-01 00:00 +0000 test
1087 main import
1088
1089 1 ffe6649062fe 1970-01-01 00:00 +0000 test
1090 deep nested modif should trigger a commit
1091
1092 2 9bb10eebee29 1970-01-01 00:00 +0000 test
1093 add test.txt
1094
1095 3 7c64f035294f 1970-01-01 00:00 +0000 test
1096 add large files
1097
1098 4 f734a59e2e35 1970-01-01 00:00 +0000 test
1099 forget testing
1100
1101 11 9685a22af5db 1970-01-01 00:00 +0000 test
1102 add sub3
1103
1104 12 2e0485b475b9 1970-01-01 00:00 +0000 test
1105 remove sub3
1106
1107 13[tip] a68b2c361653 1970-01-01 00:00 +0000 test
1108 trash subrepo tracking
1109
1110
1111 Restore the trashed subrepo tracking
1112
1113 $ hg rollback -q
1114 $ hg update -Cq .
1115
1116 Interaction with extdiff, largefiles and subrepos
1117
1118 $ hg --config extensions.extdiff= pdiff -S
1119
1120 $ hg --config extensions.extdiff= pdiff -r '.^' -S
1121 \r (no-eol) (esc)
1122 archiving [ ] 0/2\r (no-eol) (esc)
1123 archiving [====================> ] 1/2\r (no-eol) (esc)
1124 archiving [==========================================>] 2/2\r (no-eol) (esc)
1125 \r (no-eol) (esc)
1126 \r (no-eol) (esc)
1127 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1128 \r (no-eol) (esc)
1129 \r (no-eol) (esc)
1130 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
1131 \r (no-eol) (esc)
1132 \r (no-eol) (esc)
1133 archiving (sub3) [ <=> ] 0\r (no-eol) (esc)
1134 \r (no-eol) (esc)
1135 \r (no-eol) (esc)
1136 archiving [ ] 0/2\r (no-eol) (esc)
1137 archiving [====================> ] 1/2\r (no-eol) (esc)
1138 archiving [==========================================>] 2/2\r (no-eol) (esc)
1139 \r (no-eol) (esc)
1140 \r (no-eol) (esc)
1141 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1142 \r (no-eol) (esc)
1143 \r (no-eol) (esc)
1144 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
1145 \r (no-eol) (esc)
1146 diff -Nru cloned.*/.hgsub cloned/.hgsub (glob)
1147 --- cloned.*/.hgsub * (glob)
1148 +++ cloned/.hgsub * (glob)
1149 @@ -1,2 +1* @@ (glob)
1150 sub1 = ../sub1
1151 -sub3 = sub3
1152 diff -Nru cloned.*/.hgsubstate cloned/.hgsubstate (glob)
1153 --- cloned.*/.hgsubstate * (glob)
1154 +++ cloned/.hgsubstate * (glob)
1155 @@ -1,2 +1* @@ (glob)
1156 7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
1157 -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
1158 [1]
1159
1160 $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S
1161 \r (no-eol) (esc)
1162 archiving [ ] 0/3\r (no-eol) (esc)
1163 archiving [=============> ] 1/3\r (no-eol) (esc)
1164 archiving [===========================> ] 2/3\r (no-eol) (esc)
1165 archiving [==========================================>] 3/3\r (no-eol) (esc)
1166 \r (no-eol) (esc)
1167 \r (no-eol) (esc)
1168 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
1169 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
1170 \r (no-eol) (esc)
1171 \r (no-eol) (esc)
1172 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
1173 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
1174 \r (no-eol) (esc)
1175 \r (no-eol) (esc)
1176 archiving [ ] 0/8\r (no-eol) (esc)
1177 archiving [====> ] 1/8\r (no-eol) (esc)
1178 archiving [=========> ] 2/8\r (no-eol) (esc)
1179 archiving [===============> ] 3/8\r (no-eol) (esc)
1180 archiving [====================> ] 4/8\r (no-eol) (esc)
1181 archiving [=========================> ] 5/8\r (no-eol) (esc)
1182 archiving [===============================> ] 6/8\r (no-eol) (esc)
1183 archiving [====================================> ] 7/8\r (no-eol) (esc)
1184 archiving [==========================================>] 8/8\r (no-eol) (esc)
1185 \r (no-eol) (esc)
1186 \r (no-eol) (esc)
1187 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
1188 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
1189 \r (no-eol) (esc)
1190 \r (no-eol) (esc)
1191 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
1192 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
1193 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
1194 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
1195 \r (no-eol) (esc)
1196 \r (no-eol) (esc)
1197 archiving (sub3) [ ] 0/1\r (no-eol) (esc)
1198 archiving (sub3) [===================================>] 1/1\r (no-eol) (esc)
1199 \r (no-eol) (esc)
1200 diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob)
1201 --- cloned.*/.hglf/b.dat * (glob)
1202 +++ cloned.*/.hglf/b.dat * (glob)
1203 @@ -*,0 +1* @@ (glob)
1204 +da39a3ee5e6b4b0d3255bfef95601890afd80709
1205 diff -Nru cloned.*/.hglf/foo/bar/large.dat cloned.*/.hglf/foo/bar/large.dat (glob)
1206 --- cloned.*/.hglf/foo/bar/large.dat * (glob)
1207 +++ cloned.*/.hglf/foo/bar/large.dat * (glob)
1208 @@ -*,0 +1* @@ (glob)
1209 +2f6933b5ee0f5fdd823d9717d8729f3c2523811b
1210 diff -Nru cloned.*/.hglf/large.bin cloned.*/.hglf/large.bin (glob)
1211 --- cloned.*/.hglf/large.bin * (glob)
1212 +++ cloned.*/.hglf/large.bin * (glob)
1213 @@ -*,0 +1* @@ (glob)
1214 +7f7097b041ccf68cc5561e9600da4655d21c6d18
1215 diff -Nru cloned.*/.hgsub cloned.*/.hgsub (glob)
1216 --- cloned.*/.hgsub * (glob)
1217 +++ cloned.*/.hgsub * (glob)
1218 @@ -1* +1,2 @@ (glob)
1219 sub1 = ../sub1
1220 +sub3 = sub3
1221 diff -Nru cloned.*/.hgsubstate cloned.*/.hgsubstate (glob)
1222 --- cloned.*/.hgsubstate * (glob)
1223 +++ cloned.*/.hgsubstate * (glob)
1224 @@ -1* +1,2 @@ (glob)
1225 -fc3b4ce2696f7741438c79207583768f2ce6b0dd sub1
1226 +7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
1227 +b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
1228 diff -Nru cloned.*/foo/bar/def cloned.*/foo/bar/def (glob)
1229 --- cloned.*/foo/bar/def * (glob)
1230 +++ cloned.*/foo/bar/def * (glob)
1231 @@ -*,0 +1* @@ (glob)
1232 +changed
1233 diff -Nru cloned.*/main cloned.*/main (glob)
1234 --- cloned.*/main * (glob)
1235 +++ cloned.*/main * (glob)
1236 @@ -1* +1* @@ (glob)
1237 -main
1238 +foo
1239 diff -Nru cloned.*/sub1/.hgsubstate cloned.*/sub1/.hgsubstate (glob)
1240 --- cloned.*/sub1/.hgsubstate * (glob)
1241 +++ cloned.*/sub1/.hgsubstate * (glob)
1242 @@ -1* +1* @@ (glob)
1243 -c57a0840e3badd667ef3c3ef65471609acb2ba3c sub2
1244 +c77908c81ccea3794a896c79e98b0e004aee2e9e sub2
1245 diff -Nru cloned.*/sub1/sub2/folder/test.txt cloned.*/sub1/sub2/folder/test.txt (glob)
1246 --- cloned.*/sub1/sub2/folder/test.txt * (glob)
1247 +++ cloned.*/sub1/sub2/folder/test.txt * (glob)
1248 @@ -*,0 +1* @@ (glob)
1249 +subfolder
1250 diff -Nru cloned.*/sub1/sub2/sub2 cloned.*/sub1/sub2/sub2 (glob)
1251 --- cloned.*/sub1/sub2/sub2 * (glob)
1252 +++ cloned.*/sub1/sub2/sub2 * (glob)
1253 @@ -1* +1* @@ (glob)
1254 -sub2
1255 +modified
1256 diff -Nru cloned.*/sub3/a.txt cloned.*/sub3/a.txt (glob)
1257 --- cloned.*/sub3/a.txt * (glob)
1258 +++ cloned.*/sub3/a.txt * (glob)
1259 @@ -*,0 +1* @@ (glob)
1260 +xyz
1261 [1]
1262
1263 $ echo mod > sub1/sub2/sub2
1264 $ hg --config extensions.extdiff= pdiff -S
1265 \r (no-eol) (esc)
1266 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1267 \r (no-eol) (esc)
1268 \r (no-eol) (esc)
1269 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
1270 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
1271 \r (no-eol) (esc)
1272 --- */cloned.*/sub1/sub2/sub2 * (glob)
1273 +++ */cloned/sub1/sub2/sub2 * (glob)
1274 @@ -1* +1* @@ (glob)
1275 -modified
1276 +mod
1277 [1]
1278
1279 $ cd ..