# HG changeset patch # User Alexis S. L. Carvalho # Date 2007-03-27 04:41:17 # Node ID ccfe423d3d0ac8d5eaa32edac78f9455a6c91661 # Parent b0140ead7f70a5eae74587cdcd6e93287e555f2b test-merge1: avoid a shell script diff --git a/tests/test-merge1 b/tests/test-merge1 --- a/tests/test-merge1 +++ b/tests/test-merge1 @@ -1,10 +1,10 @@ #!/bin/sh -cat <<'EOF' > merge -#!/bin/sh -echo merging for `basename $1` +cat < merge +import sys, os +print "merging for", os.path.basename(sys.argv[1]) EOF -chmod +x merge +HGMERGE="python ../merge"; export HGMERGE mkdir t cd t @@ -22,7 +22,7 @@ hg add c hg commit -m "commit #2" -d "1000000 0" echo This is file b1 > b echo %% no merges expected -env HGMERGE=../merge hg merge 1 +hg merge 1 hg diff --nodates hg status cd ..; rm -r t @@ -43,9 +43,9 @@ hg add c hg commit -m "commit #2" -d "1000000 0" echo This is file b2 > b echo %% merge should fail -env HGMERGE=../merge hg merge 1 +hg merge 1 echo %% merge of b expected -env HGMERGE=../merge hg merge -f 1 +hg merge -f 1 hg diff --nodates hg status cd ..; rm -r t @@ -72,9 +72,9 @@ cat b echo This is file b22 > b echo %% merge fails -env HGMERGE=../merge hg merge 2 +hg merge 2 echo %% merge expected! -env HGMERGE=../merge hg merge -f 2 +hg merge -f 2 hg diff --nodates hg status cd ..; rm -r t @@ -96,8 +96,8 @@ hg add c hg commit -m "commit #3" -d "1000000 0" echo This is file b33 > b echo %% merge of b should fail -env HGMERGE=../merge hg merge 2 +hg merge 2 echo %% merge of b expected -env HGMERGE=../merge hg merge -f 2 +hg merge -f 2 hg diff --nodates hg status