comparison tests/test-subrepo-recursion.t @ 24924:41cd8171e58f stable

archive: always use portable path component separators with subrepos The previous behavior when archiving a subrepo 's' on Windows was to internally name the file under it 's\file', due to the use of vfs.reljoin(). When printing the file list from the archive on Windows or Linux, the file was named 's\\file'. The archive extracted OK on Windows, but if the archive was brought to a Linux system, it created a file named 's\file' instead of a directory 's' containing 'file'. *.zip format achives seemed not to have the problem, but this was definitely an issue with *.tgz archives. Largefiles actually got this right, but a test is added to keep this from regressing. The subrepo-deep-nested-change.t test was repurposed to archive to a file, since there are several subsequent tests that archive to a directory. The output change is losing the filesystem prefix '../archive_lf' and not listing the directories 'sub1' and 'sub1/sub2'.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 04 May 2015 22:33:29 -0400
parents f8bc3de9b343
children 5115d03440f4
comparison
equal deleted inserted replaced
24920:b5eb01500696 24924:41cd8171e58f
432 \r (no-eol) (esc) 432 \r (no-eol) (esc)
433 linking [ <=> ] 1cloning subrepo foo from $TESTTMP/repo/foo 433 linking [ <=> ] 1cloning subrepo foo from $TESTTMP/repo/foo
434 cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) 434 cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob)
435 #endif 435 #endif
436 436
437 Archive + subrepos uses '/' for all component separators
438
439 $ tar -tzf ../archive.tar.gz | sort
440 archive/.hg_archival.txt
441 archive/.hgsub
442 archive/.hgsubstate
443 archive/foo/.hgsub
444 archive/foo/.hgsubstate
445 archive/foo/bar/z.txt
446 archive/foo/y.txt
447 archive/x.txt
448
437 The newly cloned subrepos contain no working copy: 449 The newly cloned subrepos contain no working copy:
438 450
439 $ hg -R foo summary 451 $ hg -R foo summary
440 parent: -1:000000000000 (no revision checked out) 452 parent: -1:000000000000 (no revision checked out)
441 branch: default 453 branch: default