test-rename-merge2: avoid a shell script
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Tue, 27 Mar 2007 01:41:20 -0300
changeset 4296 c2c8491a30d6
parent 4295 a74586023196
child 4297 27590c19ad30
test-rename-merge2: avoid a shell script
tests/test-rename-merge2
--- a/tests/test-rename-merge2	Tue Mar 27 01:41:18 2007 -0300
+++ b/tests/test-rename-merge2	Tue Mar 27 01:41:20 2007 -0300
@@ -3,11 +3,13 @@
 mkdir -p t
 cd t
 
-cat <<'EOF' > merge
-#!/bin/sh
-echo merge $1 $2 $3 > $1
+cat <<EOF > merge
+import sys, os
+f = open(sys.argv[1], "wb")
+f.write("merge %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3]))
+f.close()
 EOF
-chmod +x merge
+HGMERGE="python ../merge"; export HGMERGE
 
 # perform a test merge with possible renaming
 # 
@@ -49,7 +51,7 @@
     echo "--------------"
     echo "test L:$1 R:$2 W:$3 - $4"
     echo "--------------"
-    env HGMERGE=../merge hg merge -y --debug --traceback
+    hg merge -y --debug --traceback
 
     echo "--------------"
     hg status -camC -X rev