279 on clone (and update) with various substitutions: |
279 on clone (and update) with various substitutions: |
280 |
280 |
281 $ hg clone -q main main2 |
281 $ hg clone -q main main2 |
282 abort: subrepo path contains illegal component: $SUB |
282 abort: subrepo path contains illegal component: $SUB |
283 [255] |
283 [255] |
284 $ ls main2 |
284 $ ls -A main2 |
|
285 .hg |
|
286 .hgsub |
|
287 .hgsubstate |
285 |
288 |
286 $ SUB=sub1 hg clone -q main main3 |
289 $ SUB=sub1 hg clone -q main main3 |
287 abort: subrepo path contains illegal component: $SUB |
290 abort: subrepo path contains illegal component: $SUB |
288 [255] |
291 [255] |
289 $ ls main3 |
292 $ ls -A main3 |
|
293 .hg |
|
294 .hgsub |
|
295 .hgsubstate |
290 |
296 |
291 $ SUB=sub2 hg clone -q main main4 |
297 $ SUB=sub2 hg clone -q main main4 |
292 abort: subrepo path contains illegal component: $SUB |
298 abort: subrepo path contains illegal component: $SUB |
293 [255] |
299 [255] |
294 $ ls main4 |
300 $ ls -A main4 |
|
301 .hg |
|
302 .hgsub |
|
303 .hgsubstate |
295 |
304 |
296 on clone empty subrepo into .hg, then pull (and update), which at least fails: |
305 on clone empty subrepo into .hg, then pull (and update), which at least fails: |
297 |
306 |
298 $ SUB=.hg hg clone -qr0 main main5 |
307 $ SUB=.hg hg clone -qr0 main main5 |
299 abort: subrepo path contains illegal component: $SUB |
308 abort: subrepo path contains illegal component: $SUB |
300 [255] |
309 [255] |
301 $ ls main5 |
310 $ ls -A main5 |
|
311 .hg |
|
312 .hgsub |
|
313 .hgsubstate |
302 $ test -d main5/.hg/.hg |
314 $ test -d main5/.hg/.hg |
303 [1] |
315 [1] |
304 $ SUB=.hg hg -R main5 pull -u |
316 $ SUB=.hg hg -R main5 pull -u |
305 pulling from $TESTTMP/envvar/main |
317 pulling from $TESTTMP/envvar/main |
306 searching for changes |
318 searching for changes |
318 on clone (and update) into .hg, which at least fails: |
330 on clone (and update) into .hg, which at least fails: |
319 |
331 |
320 $ SUB=.hg hg clone -q main main6 |
332 $ SUB=.hg hg clone -q main main6 |
321 abort: subrepo path contains illegal component: $SUB |
333 abort: subrepo path contains illegal component: $SUB |
322 [255] |
334 [255] |
323 $ ls main6 |
335 $ ls -A main6 |
|
336 .hg |
|
337 .hgsub |
|
338 .hgsubstate |
324 $ cat main6/.hg/hgrc | grep pwned |
339 $ cat main6/.hg/hgrc | grep pwned |
325 [1] |
340 [1] |
326 |
341 |
327 on clone (and update) into .hg/* subdir: |
342 on clone (and update) into .hg/* subdir: |
328 |
343 |
329 $ SUB=.hg/foo hg clone -q main main7 |
344 $ SUB=.hg/foo hg clone -q main main7 |
330 abort: subrepo path contains illegal component: $SUB |
345 abort: subrepo path contains illegal component: $SUB |
331 [255] |
346 [255] |
332 $ ls main7 |
347 $ ls -A main7 |
|
348 .hg |
|
349 .hgsub |
|
350 .hgsubstate |
333 $ test -d main7/.hg/.hg |
351 $ test -d main7/.hg/.hg |
334 [1] |
352 [1] |
335 |
353 |
336 on clone (and update) into outer tree: |
354 on clone (and update) into outer tree: |
337 |
355 |
338 $ SUB=../out-of-tree-write hg clone -q main main8 |
356 $ SUB=../out-of-tree-write hg clone -q main main8 |
339 abort: subrepo path contains illegal component: $SUB |
357 abort: subrepo path contains illegal component: $SUB |
340 [255] |
358 [255] |
341 $ ls main8 |
359 $ ls -A main8 |
|
360 .hg |
|
361 .hgsub |
|
362 .hgsubstate |
342 |
363 |
343 on clone (and update) into e.g. $HOME, which doesn't work since subrepo paths |
364 on clone (and update) into e.g. $HOME, which doesn't work since subrepo paths |
344 are concatenated prior to variable expansion: |
365 are concatenated prior to variable expansion: |
345 |
366 |
346 $ SUB="$TESTTMP/envvar/fakehome" hg clone -q main main9 |
367 $ SUB="$TESTTMP/envvar/fakehome" hg clone -q main main9 |
347 abort: subrepo path contains illegal component: $SUB |
368 abort: subrepo path contains illegal component: $SUB |
348 [255] |
369 [255] |
349 $ ls main9 | wc -l |
370 $ ls -A main9 | wc -l |
350 \s*0 (re) |
371 \s*3 (re) |
351 |
372 |
352 $ ls |
373 $ ls |
353 main |
374 main |
354 main2 |
375 main2 |
355 main3 |
376 main3 |
616 $ touch "$FAKEHOME/a" |
637 $ touch "$FAKEHOME/a" |
617 $ hg -R "$FAKEHOME" ci -qAm 'add fakehome file' |
638 $ hg -R "$FAKEHOME" ci -qAm 'add fakehome file' |
618 $ SUB="$FAKEHOME" hg clone -qr1 main main6 |
639 $ SUB="$FAKEHOME" hg clone -qr1 main main6 |
619 abort: subrepo path contains illegal component: $SUB |
640 abort: subrepo path contains illegal component: $SUB |
620 [255] |
641 [255] |
621 $ ls "$FAKEHOME" |
642 $ ls -A "$FAKEHOME" |
|
643 .hg |
622 a |
644 a |
623 $ SUB="$FAKEHOME" hg -R main6 pull -u |
645 $ SUB="$FAKEHOME" hg -R main6 pull -u |
624 pulling from $TESTTMP/envvarsym/main |
646 pulling from $TESTTMP/envvarsym/main |
625 searching for changes |
647 searching for changes |
626 adding changesets |
648 adding changesets |
629 added 1 changesets with 1 changes to 1 files |
651 added 1 changesets with 1 changes to 1 files |
630 new changesets * (glob) |
652 new changesets * (glob) |
631 .hgsubstate: untracked file differs |
653 .hgsubstate: untracked file differs |
632 abort: untracked files in working directory differ from files in requested revision |
654 abort: untracked files in working directory differ from files in requested revision |
633 [255] |
655 [255] |
634 $ ls "$FAKEHOME" |
656 $ ls -A "$FAKEHOME" |
|
657 .hg |
635 a |
658 a |
636 |
659 |
637 on clone only symlink with hg-managed fakehome directory, |
660 on clone only symlink with hg-managed fakehome directory, |
638 then pull (and update): |
661 then pull (and update): |
639 |
662 |
640 $ rm -fR "$FAKEHOME" |
663 $ rm -fR "$FAKEHOME" |
641 $ hg init "$FAKEHOME" |
664 $ hg init "$FAKEHOME" |
642 $ touch "$FAKEHOME/a" |
665 $ touch "$FAKEHOME/a" |
643 $ hg -R "$FAKEHOME" ci -qAm 'add fakehome file' |
666 $ hg -R "$FAKEHOME" ci -qAm 'add fakehome file' |
644 $ SUB="$FAKEHOME" hg clone -qr0 main main7 |
667 $ SUB="$FAKEHOME" hg clone -qr0 main main7 |
645 $ ls "$FAKEHOME" |
668 $ ls -A "$FAKEHOME" |
|
669 .hg |
646 a |
670 a |
647 $ SUB="$FAKEHOME" hg -R main7 pull -uf |
671 $ SUB="$FAKEHOME" hg -R main7 pull -uf |
648 pulling from $TESTTMP/envvarsym/main |
672 pulling from $TESTTMP/envvarsym/main |
649 searching for changes |
673 searching for changes |
650 adding changesets |
674 adding changesets |