diff options
Diffstat (limited to 'tests/test-subrepo-recursion.t')
-rw-r--r-- | tests/test-subrepo-recursion.t | 123 |
1 files changed, 23 insertions, 100 deletions
diff --git a/tests/test-subrepo-recursion.t b/tests/test-subrepo-recursion.t index fa419b3..c953cdf 100644 --- a/tests/test-subrepo-recursion.t +++ b/tests/test-subrepo-recursion.t @@ -23,10 +23,10 @@ Add files --- .hgsub files must go first to trigger subrepos: $ hg add -S .hgsub $ hg add -S foo/.hgsub $ hg add -S foo/bar - adding foo/bar/z.txt (glob) + adding foo/bar/z.txt $ hg add -S adding x.txt - adding foo/y.txt (glob) + adding foo/y.txt Test recursive status without committing anything: @@ -58,16 +58,9 @@ Test recursive diff without committing anything: Commits: - $ hg commit -m fails - abort: uncommitted changes in subrepo foo - (use --subrepos for recursive commit) - [255] - -The --subrepos flag overwrite the config setting: - - $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos + $ hg commit -m 0-0-0 committing subrepository foo - committing subrepository foo/bar (glob) + committing subrepository foo/bar $ cd foo $ echo y2 >> y.txt @@ -79,9 +72,11 @@ The --subrepos flag overwrite the config setting: $ cd .. $ hg commit -m 0-2-1 + committing subrepository bar $ cd .. $ hg commit -m 1-2-1 + committing subrepository foo Change working directory: @@ -182,26 +177,9 @@ Status with relative path: Cleanup and final commit: $ rm -r dir - $ hg commit --subrepos -m 2-3-2 + $ hg commit -m 2-3-2 committing subrepository foo - committing subrepository foo/bar (glob) - -Test explicit path commands within subrepos: add/forget - $ echo z1 > foo/bar/z2.txt - $ hg status -S - ? foo/bar/z2.txt - $ hg add foo/bar/z2.txt - $ hg status -S - A foo/bar/z2.txt - $ hg forget foo/bar/z2.txt - $ hg status -S - ? foo/bar/z2.txt - $ hg forget foo/bar/z2.txt - not removing foo/bar/z2.txt: file is already untracked (glob) - [1] - $ hg status -S - ? foo/bar/z2.txt - $ rm foo/bar/z2.txt + committing subrepository foo/bar Log with the relationships between repo and its subrepo: @@ -260,7 +238,7 @@ Enable progress extension for archive tests: Test archiving to a directory tree (the doubled lines in the output only show up in the test output, not in real usage): - $ hg archive --subrepos ../archive 2>&1 | "$TESTDIR/filtercr.py" + $ hg archive --subrepos ../archive 2>&1 | $TESTDIR/filtercr.py archiving [ ] 0/3 archiving [ ] 0/3 @@ -280,10 +258,10 @@ only show up in the test output, not in real usage): archiving (foo) [====================================>] 3/3 archiving (foo) [====================================>] 3/3 - archiving (foo/bar) [ ] 0/1 (glob) - archiving (foo/bar) [ ] 0/1 (glob) - archiving (foo/bar) [================================>] 1/1 (glob) - archiving (foo/bar) [================================>] 1/1 (glob) + archiving (foo/bar) [ ] 0/1 + archiving (foo/bar) [ ] 0/1 + archiving (foo/bar) [================================>] 1/1 + archiving (foo/bar) [================================>] 1/1 \r (esc) $ find ../archive | sort ../archive @@ -300,7 +278,7 @@ only show up in the test output, not in real usage): Test archiving to zip file (unzip output is unstable): - $ hg archive --subrepos ../archive.zip 2>&1 | "$TESTDIR/filtercr.py" + $ hg archive --subrepos ../archive.zip 2>&1 | $TESTDIR/filtercr.py archiving [ ] 0/3 archiving [ ] 0/3 @@ -320,80 +298,27 @@ Test archiving to zip file (unzip output is unstable): archiving (foo) [====================================>] 3/3 archiving (foo) [====================================>] 3/3 - archiving (foo/bar) [ ] 0/1 (glob) - archiving (foo/bar) [ ] 0/1 (glob) - archiving (foo/bar) [================================>] 1/1 (glob) - archiving (foo/bar) [================================>] 1/1 (glob) + archiving (foo/bar) [ ] 0/1 + archiving (foo/bar) [ ] 0/1 + archiving (foo/bar) [================================>] 1/1 + archiving (foo/bar) [================================>] 1/1 \r (esc) -Test archiving a revision that references a subrepo that is not yet -cloned: - - $ hg clone -U . ../empty - $ cd ../empty - $ hg archive --subrepos -r tip ../archive.tar.gz 2>&1 | "$TESTDIR/filtercr.py" - - archiving [ ] 0/3 - archiving [ ] 0/3 - archiving [=============> ] 1/3 - archiving [=============> ] 1/3 - archiving [===========================> ] 2/3 - archiving [===========================> ] 2/3 - archiving [==========================================>] 3/3 - archiving [==========================================>] 3/3 - - archiving (foo) [ ] 0/3 - archiving (foo) [ ] 0/3 - archiving (foo) [===========> ] 1/3 - archiving (foo) [===========> ] 1/3 - archiving (foo) [=======================> ] 2/3 - archiving (foo) [=======================> ] 2/3 - archiving (foo) [====================================>] 3/3 - archiving (foo) [====================================>] 3/3 - - archiving (foo/bar) [ ] 0/1 (glob) - archiving (foo/bar) [ ] 0/1 (glob) - archiving (foo/bar) [================================>] 1/1 (glob) - archiving (foo/bar) [================================>] 1/1 (glob) - - cloning subrepo foo from $TESTTMP/repo/foo - cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) - -The newly cloned subrepos contain no working copy: - - $ hg -R foo summary - parent: -1:000000000000 (no revision checked out) - branch: default - commit: (clean) - update: 4 new changesets (update) - Disable progress extension and cleanup: $ mv $HGRCPATH.no-progress $HGRCPATH -Test archiving when there is a directory in the way for a subrepo -created by archive: - - $ hg clone -U . ../almost-empty - $ cd ../almost-empty - $ mkdir foo - $ echo f > foo/f - $ hg archive --subrepos -r tip archive - cloning subrepo foo from $TESTTMP/empty/foo - abort: destination '$TESTTMP/almost-empty/foo' is not empty (glob) - [255] - Clone and test outgoing: $ cd .. $ hg clone repo repo2 updating to branch default cloning subrepo foo from $TESTTMP/repo/foo - cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) + cloning subrepo foo/bar from $TESTTMP/repo/foo/bar 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd repo2 $ hg outgoing -S - comparing with $TESTTMP/repo (glob) + comparing with $TESTTMP/repo searching for changes no changes found comparing with $TESTTMP/repo/foo @@ -416,10 +341,10 @@ Make nested change: y2 y3 +y4 - $ hg commit --subrepos -m 3-4-2 + $ hg commit -m 3-4-2 committing subrepository foo $ hg outgoing -S - comparing with $TESTTMP/repo (glob) + comparing with $TESTTMP/repo searching for changes changeset: 3:2655b8ecc4ee tag: tip @@ -449,7 +374,7 @@ Switch to original repo and setup default path: Test incoming: $ hg incoming -S - comparing with $TESTTMP/repo2 (glob) + comparing with $TESTTMP/repo2 searching for changes changeset: 3:2655b8ecc4ee tag: tip @@ -490,5 +415,3 @@ The subrepo must sorts after the explicit filename. $ hg add .hgsub $ touch a x/a $ hg add a x/a - - $ cd .. |