##// END OF EJS Templates
run-tests: give each child its own tmp dir (issue1911)...
run-tests: give each child its own tmp dir (issue1911) Fixes bug introduced by f8b4df4b033d (issue1911: --tmpdir plus parallel mode = fail), and also fixes the long-standing quirk that parallel mode created multiple /tmp/hgtests.XXXXXX directories. Now there is only one /tmp/hgtests.XXXXXX, with child0, child1, etc. under it.

File last commit:

r8518:3f4f14ea default
r9899:be574a37 stable
Show More
test-mv-cp-st-diff
80 lines | 1.4 KiB | text/plain | TextLexer
/ tests / test-mv-cp-st-diff
Matt Mackall
copies: add tests for status -C/diff --git...
r6278 #!/bin/sh
add()
{
echo $2 >> $1
}
hg init t
cd t
# set up a boring main branch
add a a
hg add a
Matt Mackall
copies: skip directory rename checks when not merging...
r6425 mkdir x
add x/x x
hg add x/x
Matt Mackall
copies: add tests for status -C/diff --git...
r6278 hg ci -m0
add a m1
hg ci -m1
add a m2
Matt Mackall
copies: skip directory rename checks when not merging...
r6425 add x/y y1
hg add x/y
Matt Mackall
copies: add tests for status -C/diff --git...
r6278 hg ci -m2
Benoit Boissinot
update --clean: do not unlink added files (issue575)
r8518 cd ..
Matt Mackall
copies: add tests for status -C/diff --git...
r6278
show()
{
echo "- $2: $1"
hg st -C $1
echo
hg diff --git $1
echo
}
Alexis S. L. Carvalho
test-mv-cp-st-diff: avoid linkrev collisions...
r6282 count=0
Matt Mackall
copies: add tests for status -C/diff --git...
r6278 # make a new branch and get diff/status output
# $1 - first commit
# $2 - second commit
# $3 - working dir action
# $4 - test description
tb()
{
Benoit Boissinot
update --clean: do not unlink added files (issue575)
r8518 hg clone t t2 ; cd t2
Matt Mackall
copies: add tests for status -C/diff --git...
r6278 hg co -q -C 0
Alexis S. L. Carvalho
test-mv-cp-st-diff: avoid linkrev collisions...
r6282 add a $count
count=`expr $count + 1`
hg ci -m "t0"
Matt Mackall
copies: add tests for status -C/diff --git...
r6278 $1
hg ci -m "t1"
$2
hg ci -m "t2"
$3
echo "** $4 **"
echo "** $1 / $2 / $3"
show "" "working to parent"
show "--rev 0" "working to root"
show "--rev 2" "working to branch"
show "--rev 0 --rev ." "root to parent"
show "--rev . --rev 0" "parent to root"
show "--rev 2 --rev ." "branch to parent"
show "--rev . --rev 2" "parent to branch"
echo
Benoit Boissinot
update --clean: do not unlink added files (issue575)
r8518 cd ..
rm -rf t2
Matt Mackall
copies: add tests for status -C/diff --git...
r6278 }
Matt Mackall
copies: skip directory rename checks when not merging...
r6425
Matt Mackall
copies: add tests for status -C/diff --git...
r6278 tb "add a a1" "add a a2" "hg mv a b" "rename in working dir"
tb "add a a1" "add a a2" "hg cp a b" "copy in working dir"
tb "hg mv a b" "add b b1" "add b w" "single rename"
tb "hg cp a b" "add b b1" "add a w" "single copy"
tb "hg mv a b" "hg mv b c" "hg mv c d" "rename chain"
tb "hg cp a b" "hg cp b c" "hg cp c d" "copy chain"
Alexis S. L. Carvalho
filectx.ancestor: use fctx._repopath to cache filelogs (issue1035)...
r6286 tb "add a a1" "hg mv a b" "hg mv b a" "circular rename"
Matt Mackall
copies: skip directory rename checks when not merging...
r6425
tb "hg mv x y" "add y/x x1" "add y/x x2" "directory move"