test-extdiff: replace shell script with python for portability
authorPatrick Mezard <pmezard@gmail.com>
Sun, 26 Apr 2009 19:26:22 +0200
changeset 8212 bf795c34c63d
parent 8211 5b4ff21c74e4
child 8213 ac9c4049fd29
test-extdiff: replace shell script with python for portability
tests/test-extdiff
--- a/tests/test-extdiff	Sun Apr 26 18:36:36 2009 +0200
+++ b/tests/test-extdiff	Sun Apr 26 19:26:22 2009 +0200
@@ -54,13 +54,14 @@
 hg diff --git
 echo '% edit with extdiff -p'
 # prepare custom diff/edit tool
-cat > differ.sh << EOT
-#!/bin/sh
-sleep 1 # avoid unchanged-timestamp problems
-echo edited >> a/a
-echo edited >> a/b
+cat > differ.py << EOT
+#!/usr/bin/env python
+import time
+time.sleep(1) # avoid unchanged-timestamp problems
+file('a/a', 'ab').write('edited\n')
+file('a/b', 'ab').write('edited\n')
 EOT
-chmod +x differ.sh
-hg extdiff -p `pwd`/differ.sh # will change to /tmp/extdiff.TMP and populate directories a.TMP and a and start tool
+chmod +x differ.py
+hg extdiff -p `pwd`/differ.py # will change to /tmp/extdiff.TMP and populate directories a.TMP and a and start tool
 echo '% diff in working directory, after'
 hg diff --git