Mercurial > hg-stable
changeset 8212:bf795c34c63d
test-extdiff: replace shell script with python for portability
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 26 Apr 2009 19:26:22 +0200 |
parents | 5b4ff21c74e4 |
children | ac9c4049fd29 |
files | tests/test-extdiff |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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