Mercurial > hg
changeset 22947:c63a09b6b337
tests: use $PYTHON instead of hardcoding python
This makes running the testsuite with pypy possible.
line wrap: on
line diff
--- a/tests/test-addremove-similar.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-addremove-similar.t Wed Oct 15 15:35:59 2014 -0400 @@ -1,7 +1,7 @@ $ hg init rep; cd rep $ touch empty-file - $ python -c 'for x in range(10000): print x' > large-file + $ $PYTHON -c 'for x in range(10000): print x' > large-file $ hg addremove adding empty-file @@ -10,7 +10,7 @@ $ hg commit -m A $ rm large-file empty-file - $ python -c 'for x in range(10,10000): print x' > another-file + $ $PYTHON -c 'for x in range(10,10000): print x' > another-file $ hg addremove -s50 adding another-file @@ -34,8 +34,8 @@ $ hg init rep2; cd rep2 - $ python -c 'for x in range(10000): print x' > large-file - $ python -c 'for x in range(50): print x' > tiny-file + $ $PYTHON -c 'for x in range(10000): print x' > large-file + $ $PYTHON -c 'for x in range(50): print x' > tiny-file $ hg addremove adding large-file @@ -43,7 +43,7 @@ $ hg commit -m A - $ python -c 'for x in range(70): print x' > small-file + $ $PYTHON -c 'for x in range(70): print x' > small-file $ rm tiny-file $ rm large-file
--- a/tests/test-clone.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-clone.t Wed Oct 15 15:35:59 2014 -0400 @@ -10,7 +10,7 @@ Create a non-inlined filelog: - $ python -c 'file("data1", "wb").write("".join("%s\n" % x for x in range(10000)))' + $ $PYTHON -c 'file("data1", "wb").write("".join("%s\n" % x for x in range(10000)))' $ for j in 0 1 2 3 4 5 6 7 8 9; do > cat data1 >> b > hg commit -m test
--- a/tests/test-contrib.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-contrib.t Wed Oct 15 15:35:59 2014 -0400 @@ -207,7 +207,7 @@ binary file - $ python -c "f = file('binary-local', 'w'); f.write('\x00'); f.close()" + $ $PYTHON -c "f = file('binary-local', 'w'); f.write('\x00'); f.close()" $ cat orig >> binary-local $ python simplemerge -p binary-local base other warning: binary-local looks like a binary file.
--- a/tests/test-convert-git.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-convert-git.t Wed Oct 15 15:35:59 2014 -0400 @@ -297,7 +297,7 @@ $ mkdir git-repo3 $ cd git-repo3 $ git init-db >/dev/null 2>/dev/null - $ python -c 'file("b", "wb").write("".join([chr(i) for i in range(256)])*16)' + $ $PYTHON -c 'file("b", "wb").write("".join([chr(i) for i in range(256)])*16)' $ git add b $ commit -a -m addbinary $ cd .. @@ -314,7 +314,7 @@ $ cd git-repo3-hg $ hg up -C 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ python -c 'print len(file("b", "rb").read())' + $ $PYTHON -c 'print len(file("b", "rb").read())' 4096 $ cd ..
--- a/tests/test-convert-hg-svn.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-convert-hg-svn.t Wed Oct 15 15:35:59 2014 -0400 @@ -6,9 +6,9 @@ $ SVNREPOPATH=`pwd`/svn-repo #if windows - $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` + $ SVNREPOURL=file:///`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` #else - $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` + $ SVNREPOURL=file://`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` #endif $ svnadmin create "$SVNREPOPATH"
--- a/tests/test-convert-mtn.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-convert-mtn.t Wed Oct 15 15:35:59 2014 -0400 @@ -43,7 +43,7 @@ $ mkdir dir $ echo b > dir/b $ echo d > dir/d - $ python -c 'file("bin", "wb").write("a\\x00b")' + $ $PYTHON -c 'file("bin", "wb").write("a\\x00b")' $ echo c > c $ mtn add a dir/b dir/d c bin mtn: adding 'a' to workspace manifest @@ -65,7 +65,7 @@ $ echo b >> dir/b $ mtn drop c mtn: dropping 'c' from workspace manifest - $ python -c 'file("bin", "wb").write("b\\x00c")' + $ $PYTHON -c 'file("bin", "wb").write("b\\x00c")' $ mtn ci -m update1 mtn: beginning commit on branch 'com.selenic.test' mtn: committed revision 51d0a982464573a2a2cf5ee2c9219c652aaebeff
--- a/tests/test-convert-p4-filetypes.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-convert-p4-filetypes.t Wed Oct 15 15:35:59 2014 -0400 @@ -52,7 +52,7 @@ > p4 add -t $T file_$T2 > ;; > binary*) - > python -c "file('file_$T2', 'wb').write('this is $T')" + > $PYTHON -c "file('file_$T2', 'wb').write('this is $T')" > p4 add -t $T file_$T2 > ;; > *)
--- a/tests/test-convert-svn-move.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-convert-svn-move.t Wed Oct 15 15:35:59 2014 -0400 @@ -9,9 +9,9 @@ $ svnadmin load -q svn-repo < "$TESTDIR/svn/move.svndump" $ SVNREPOPATH=`pwd`/svn-repo #if windows - $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` + $ SVNREPOURL=file:///`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` #else - $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` + $ SVNREPOURL=file://`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` #endif Convert trunk and branches
--- a/tests/test-convert-svn-source.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-convert-svn-source.t Wed Oct 15 15:35:59 2014 -0400 @@ -10,9 +10,9 @@ $ svnadmin create svn-repo $ SVNREPOPATH=`pwd`/svn-repo #if windows - $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` + $ SVNREPOURL=file:///`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` #else - $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` + $ SVNREPOURL=file://`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` #endif $ INVALIDREVISIONID=svn:x2147622-4a9f-4db4-a8d3-13562ff547b2/proj%20B/mytrunk@1 $ VALIDREVISIONID=svn:a2147622-4a9f-4db4-a8d3-13562ff547b2/proj%20B/mytrunk/mytrunk@1
--- a/tests/test-diff-newlines.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-diff-newlines.t Wed Oct 15 15:35:59 2014 -0400 @@ -1,6 +1,6 @@ $ hg init - $ python -c 'file("a", "wb").write("confuse str.splitlines\nembedded\rnewline\n")' + $ $PYTHON -c 'file("a", "wb").write("confuse str.splitlines\nembedded\rnewline\n")' $ hg ci -Ama -d '1 0' adding a
--- a/tests/test-diff-upgrade.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-diff-upgrade.t Wed Oct 15 15:35:59 2014 -0400 @@ -14,7 +14,7 @@ $ echo regular > regular $ echo rmregular > rmregular - $ python -c "file('bintoregular', 'wb').write('\0')" + $ $PYTHON -c "file('bintoregular', 'wb').write('\0')" $ touch rmempty $ echo exec > exec $ chmod +x exec @@ -24,7 +24,7 @@ $ echo unsetexec > unsetexec $ chmod +x unsetexec $ echo binary > binary - $ python -c "file('rmbinary', 'wb').write('\0')" + $ $PYTHON -c "file('rmbinary', 'wb').write('\0')" $ hg ci -Am addfiles adding binary adding bintoregular @@ -48,8 +48,8 @@ $ rm rmexec $ chmod +x setexec $ chmod -x unsetexec - $ python -c "file('binary', 'wb').write('\0\0')" - $ python -c "file('newbinary', 'wb').write('\0')" + $ $PYTHON -c "file('binary', 'wb').write('\0\0')" + $ $PYTHON -c "file('newbinary', 'wb').write('\0')" $ rm rmbinary $ hg addremove -s 0 adding newbinary
--- a/tests/test-extension.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-extension.t Wed Oct 15 15:35:59 2014 -0400 @@ -729,7 +729,7 @@ ** Extensions loaded: throw, older Declare the version as supporting this hg version, show regular bts link: - $ hgver=`python -c 'from mercurial import util; print util.version().split("+")[0]'` + $ hgver=`$PYTHON -c 'from mercurial import util; print util.version().split("+")[0]'` $ echo 'testedwith = """'"$hgver"'"""' >> throw.py $ rm -f throw.pyc throw.pyo $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
--- a/tests/test-glog.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-glog.t Wed Oct 15 15:35:59 2014 -0400 @@ -1631,7 +1631,7 @@ Test glob expansion of pats - $ expandglobs=`python -c "import mercurial.util; \ + $ expandglobs=`$PYTHON -c "import mercurial.util; \ > print mercurial.util.expandglobs and 'true' or 'false'"` $ if [ $expandglobs = "true" ]; then > testlog 'a*';
--- a/tests/test-grep.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-grep.t Wed Oct 15 15:35:59 2014 -0400 @@ -110,7 +110,7 @@ match in last "line" without newline - $ python -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();' + $ $PYTHON -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();' $ hg ci -Amnoeol adding noeol $ hg grep loop
--- a/tests/test-hgrc.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-hgrc.t Wed Oct 15 15:35:59 2014 -0400 @@ -58,7 +58,7 @@ unexpected leading whitespace [255] - $ python -c "print '[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n'" \ + $ $PYTHON -c "print '[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n'" \ > > $HGRC $ hg showconfig foo foo.bar=a\nb\nc\nde\nfg
--- a/tests/test-hgweb-commands.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-hgweb-commands.t Wed Oct 15 15:35:59 2014 -0400 @@ -2034,7 +2034,7 @@ commit message with Japanese Kanji 'Noh', which ends with '\x5c' $ echo foo >> foo - $ HGENCODING=cp932 hg ci -m `python -c 'print("\x94\x5c")'` + $ HGENCODING=cp932 hg ci -m `$PYTHON -c 'print("\x94\x5c")'` Graph json escape of multibyte character
--- a/tests/test-hgweb.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-hgweb.t Wed Oct 15 15:35:59 2014 -0400 @@ -325,7 +325,7 @@ Test the access/error files are opened in append mode - $ python -c "print len(file('access.log').readlines()), 'log lines written'" + $ $PYTHON -c "print len(file('access.log').readlines()), 'log lines written'" 14 log lines written static file
--- a/tests/test-highlight.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-highlight.t Wed Oct 15 15:35:59 2014 -0400 @@ -577,7 +577,7 @@ $ cd .. $ hg init eucjp $ cd eucjp - $ python -c 'print("\265\376")' >> eucjp.txt # Japanese kanji "Kyo" + $ $PYTHON -c 'print("\265\376")' >> eucjp.txt # Japanese kanji "Kyo" $ hg ci -Ama adding eucjp.txt $ hgserveget () {
--- a/tests/test-import-bypass.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-import-bypass.t Wed Oct 15 15:35:59 2014 -0400 @@ -143,7 +143,7 @@ (this also tests that editor is not invoked for '--bypass', if the commit message is explicitly specified, regardless of '--edit') - $ python -c 'file("a", "wb").write("a\r\n")' + $ $PYTHON -c 'file("a", "wb").write("a\r\n")' $ hg ci -m makeacrlf $ HGEDITOR=cat hg import -m 'should fail because of eol' --edit --bypass ../test.diff applying ../test.diff
--- a/tests/test-import-eol.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-import-eol.t Wed Oct 15 15:35:59 2014 -0400 @@ -25,7 +25,7 @@ Test different --eol values - $ python -c 'file("a", "wb").write("a\nbbb\ncc\n\nd\ne")' + $ $PYTHON -c 'file("a", "wb").write("a\nbbb\ncc\n\nd\ne")' $ hg ci -Am adda adding .hgignore adding a @@ -89,7 +89,7 @@ auto EOL on CRLF file - $ python -c 'file("a", "wb").write("a\r\nbbb\r\ncc\r\n\r\nd\r\ne")' + $ $PYTHON -c 'file("a", "wb").write("a\r\nbbb\r\ncc\r\n\r\nd\r\ne")' $ hg commit -m 'switch EOLs in a' $ hg --traceback --config patch.eol='auto' import eol.diff applying eol.diff @@ -105,11 +105,11 @@ auto EOL on new file or source without any EOL - $ python -c 'file("noeol", "wb").write("noeol")' + $ $PYTHON -c 'file("noeol", "wb").write("noeol")' $ hg add noeol $ hg commit -m 'add noeol' - $ python -c 'file("noeol", "wb").write("noeol\r\nnoeol\n")' - $ python -c 'file("neweol", "wb").write("neweol\nneweol\r\n")' + $ $PYTHON -c 'file("noeol", "wb").write("noeol\r\nnoeol\n")' + $ $PYTHON -c 'file("neweol", "wb").write("neweol\nneweol\r\n")' $ hg add neweol $ hg diff --git > noeol.diff $ hg revert --no-backup noeol neweol @@ -127,10 +127,10 @@ Test --eol and binary patches - $ python -c 'file("b", "wb").write("a\x00\nb\r\nd")' + $ $PYTHON -c 'file("b", "wb").write("a\x00\nb\r\nd")' $ hg ci -Am addb adding b - $ python -c 'file("b", "wb").write("a\x00\nc\r\nd")' + $ $PYTHON -c 'file("b", "wb").write("a\x00\nc\r\nd")' $ hg diff --git > bin.diff $ hg revert --no-backup b
--- a/tests/test-import.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-import.t Wed Oct 15 15:35:59 2014 -0400 @@ -589,7 +589,7 @@ $ hg init binaryremoval $ cd binaryremoval $ echo a > a - $ python -c "file('b', 'wb').write('a\x00b')" + $ $PYTHON -c "file('b', 'wb').write('a\x00b')" $ hg ci -Am addall adding a adding b
--- a/tests/test-module-imports.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-module-imports.t Wed Oct 15 15:35:59 2014 -0400 @@ -1,6 +1,6 @@ This code uses the ast module, which was new in 2.6, so we'll skip this test on anything earlier. - $ python -c 'import sys ; assert sys.version_info >= (2, 6)' || exit 80 + $ $PYTHON -c 'import sys ; assert sys.version_info >= (2, 6)' || exit 80 $ import_checker="$TESTDIR"/../contrib/import-checker.py Run the doctests from the import checker, and make sure
--- a/tests/test-mq-eol.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-mq-eol.t Wed Oct 15 15:35:59 2014 -0400 @@ -42,7 +42,7 @@ Test different --eol values - $ python -c 'file("a", "wb").write("a\nb\nc\nd\ne")' + $ $PYTHON -c 'file("a", "wb").write("a\nb\nc\nd\ne")' $ hg ci -Am adda adding .hgignore adding a @@ -150,15 +150,15 @@ $ hg init testeol $ cd testeol - $ python -c "file('a', 'wb').write('1\r\n2\r\n3\r\n4')" + $ $PYTHON -c "file('a', 'wb').write('1\r\n2\r\n3\r\n4')" $ hg ci -Am adda adding a - $ python -c "file('a', 'wb').write('1\r\n2\r\n33\r\n4')" + $ $PYTHON -c "file('a', 'wb').write('1\r\n2\r\n33\r\n4')" $ hg qnew patch1 $ hg qpop popping patch1 patch queue now empty - $ python -c "file('a', 'wb').write('1\r\n22\r\n33\r\n4')" + $ $PYTHON -c "file('a', 'wb').write('1\r\n22\r\n33\r\n4')" $ hg ci -m changea $ hg --config 'patch.eol=LF' qpush
--- a/tests/test-mq-qpush-fail.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-mq-qpush-fail.t Wed Oct 15 15:35:59 2014 -0400 @@ -31,7 +31,7 @@ popping patch2 popping patch1 patch queue now empty - $ python -c 'print "\xe9"' > message + $ $PYTHON -c 'print "\xe9"' > message $ cat .hg/patches/bad-patch >> message $ mv message .hg/patches/bad-patch $ hg qpush -a && echo 'qpush succeeded?!'
--- a/tests/test-mq-subrepo-svn.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-mq-subrepo-svn.t Wed Oct 15 15:35:59 2014 -0400 @@ -19,9 +19,9 @@ $ SVNREPOPATH=`pwd`/svn-repo-2499/project #if windows - $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` + $ SVNREPOURL=file:///`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` #else - $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` + $ SVNREPOURL=file://`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` #endif $ mkdir -p svn-project-2499/trunk
--- a/tests/test-notify-changegroup.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-notify-changegroup.t Wed Oct 15 15:35:59 2014 -0400 @@ -39,7 +39,7 @@ push $ hg --traceback --cwd b push ../a 2>&1 | - > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' + > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' pushing to ../a searching for changes adding changesets @@ -92,7 +92,7 @@ unbundle with correct source $ hg --config notify.sources=unbundle --cwd a unbundle ../test.hg 2>&1 | - > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' + > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' adding changesets adding manifests adding file changes @@ -167,7 +167,7 @@ push $ hg --traceback --cwd b --config notify.fromauthor=True push ../a 2>&1 | - > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' + > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' pushing to ../a searching for changes adding changesets
--- a/tests/test-notify.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-notify.t Wed Oct 15 15:35:59 2014 -0400 @@ -176,7 +176,7 @@ pull (minimal config) $ hg --traceback --cwd b pull ../a | \ - > python -c 'import sys,re; print re.sub("\n[\t ]", " ", sys.stdin.read()),' + > $PYTHON -c 'import sys,re; print re.sub("\n[\t ]", " ", sys.stdin.read()),' pulling from ../a searching for changes adding changesets @@ -229,7 +229,7 @@ $ hg --cwd b rollback repository tip rolled back to revision 0 (undo pull) $ hg --traceback --cwd b pull ../a | \ - > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' + > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' pulling from ../a searching for changes adding changesets @@ -273,7 +273,7 @@ $ hg --cwd b rollback repository tip rolled back to revision 0 (undo pull) $ hg --traceback --cwd b pull ../a | \ - > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' + > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' pulling from ../a searching for changes adding changesets @@ -322,7 +322,7 @@ $ hg ci -m merge -d '3 0' $ cd .. $ hg --traceback --cwd b pull ../a | \ - > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' + > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' pulling from ../a searching for changes adding changesets @@ -378,9 +378,9 @@ > EOF $ echo a >> a/a $ hg --cwd a --encoding utf-8 commit -A -d '0 0' \ - > -m `python -c 'print "\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4"'` + > -m `$PYTHON -c 'print "\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4"'` $ hg --traceback --cwd b --encoding utf-8 pull ../a | \ - > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' + > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' pulling from ../a searching for changes adding changesets @@ -424,7 +424,7 @@ > test = False > mbox = mbox > EOF - $ python -c 'file("a/a", "ab").write("no" * 500 + "\n")' + $ $PYTHON -c 'file("a/a", "ab").write("no" * 500 + "\n")' $ hg --cwd a commit -A -m "long line" $ hg --traceback --cwd b pull ../a pulling from ../a @@ -435,7 +435,7 @@ added 1 changesets with 1 changes to 1 files notify: sending 2 subscribers 1 changes (run 'hg update' to get a working copy) - $ python -c 'import sys,re; print re.sub("\n\t", " ", file("b/mbox").read()),' + $ $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", file("b/mbox").read()),' From test@test.com ... ... .. ..:..:.. .... (re) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 @@ -501,7 +501,7 @@ $ echo a >> a/a $ hg --cwd a ci -m test -d '1 0' $ hg --traceback --cwd b pull ../a | \ - > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' + > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' pulling from ../a searching for changes adding changesets @@ -531,7 +531,7 @@ $ echo a >> a/a $ hg --cwd a ci -m test -d '1 0' $ hg --traceback --cwd b pull ../a | \ - > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' + > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' pulling from ../a searching for changes adding changesets
--- a/tests/test-patchbomb.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-patchbomb.t Wed Oct 15 15:35:59 2014 -0400 @@ -270,7 +270,7 @@ --===*=-- (glob) utf-8 patch: - $ python -c 'fp = open("utf", "wb"); fp.write("h\xC3\xB6mma!\n"); fp.close();' + $ $PYTHON -c 'fp = open("utf", "wb"); fp.write("h\xC3\xB6mma!\n"); fp.close();' $ hg commit -A -d '4 0' -m 'utf-8 content' adding description adding utf @@ -354,7 +354,7 @@ QEAgLTAsMCArMSwxIEBACitow7ZtbWEhCg== - $ python -c 'print open("mbox").read().split("\n\n")[1].decode("base64")' + $ $PYTHON -c 'print open("mbox").read().split("\n\n")[1].decode("base64")' # HG changeset patch # User test # Date 4 0 @@ -379,7 +379,7 @@ $ rm mbox mime encoded mbox (quoted-printable): - $ python -c 'fp = open("long", "wb"); fp.write("%s\nfoo\n\nbar\n" % ("x" * 1024)); fp.close();' + $ $PYTHON -c 'fp = open("long", "wb"); fp.write("%s\nfoo\n\nbar\n" % ("x" * 1024)); fp.close();' $ hg commit -A -d '4 0' -m 'long line' adding long @@ -493,7 +493,7 @@ $ rm mbox iso-8859-1 patch: - $ python -c 'fp = open("isolatin", "wb"); fp.write("h\xF6mma!\n"); fp.close();' + $ $PYTHON -c 'fp = open("isolatin", "wb"); fp.write("h\xF6mma!\n"); fp.close();' $ hg commit -A -d '5 0' -m 'isolatin 8-bit encoding' adding isolatin @@ -2237,7 +2237,7 @@ test multi-byte domain parsing: - $ UUML=`python -c 'import sys; sys.stdout.write("\374")'` + $ UUML=`$PYTHON -c 'import sys; sys.stdout.write("\374")'` $ HGENCODING=iso-8859-1 $ export HGENCODING $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "bar@${UUML}nicode.com" -s test -r 0
--- a/tests/test-pull.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-pull.t Wed Oct 15 15:35:59 2014 -0400 @@ -81,12 +81,12 @@ It's tricky to make file:// URLs working on every platform with regular shell commands. - $ URL=`python -c "import os; print 'file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"` + $ URL=`$PYTHON -c "import os; print 'file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"` $ hg pull -q "$URL" abort: file:// URLs can only refer to localhost [255] - $ URL=`python -c "import os; print 'file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"` + $ URL=`$PYTHON -c "import os; print 'file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"` $ hg pull -q "$URL" $ cd ..
--- a/tests/test-relink.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-relink.t Wed Oct 15 15:35:59 2014 -0400 @@ -47,7 +47,7 @@ Test files are read in binary mode - $ python -c "file('.hg/store/data/dummy.i', 'wb').write('a\r\nb\n')" + $ $PYTHON -c "file('.hg/store/data/dummy.i', 'wb').write('a\r\nb\n')" $ cd .. @@ -65,7 +65,7 @@ $ echo b >> b $ hg ci -m changeb created new head - $ python -c "file('.hg/store/data/dummy.i', 'wb').write('a\nb\r\n')" + $ $PYTHON -c "file('.hg/store/data/dummy.i', 'wb').write('a\nb\r\n')" relink
--- a/tests/test-subrepo-svn.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-subrepo-svn.t Wed Oct 15 15:35:59 2014 -0400 @@ -2,9 +2,9 @@ $ SVNREPOPATH=`pwd`/svn-repo #if windows - $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` + $ SVNREPOURL=file:///`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` #else - $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` + $ SVNREPOURL=file://`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` #endif create subversion repo @@ -242,7 +242,7 @@ verify subrepo is contained within the repo directory - $ python -c "import os.path; print os.path.exists('s')" + $ $PYTHON -c "import os.path; print os.path.exists('s')" True update to nullrev (must delete the subrepo)
--- a/tests/test-transplant.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-transplant.t Wed Oct 15 15:35:59 2014 -0400 @@ -668,7 +668,7 @@ $ cd twin2 $ echo '[patch]' >> .hg/hgrc $ echo 'eol = crlf' >> .hg/hgrc - $ python -c "file('b', 'wb').write('b\r\nb\r\n')" + $ $PYTHON -c "file('b', 'wb').write('b\r\nb\r\n')" $ hg ci -Am addb adding b $ hg transplant -s ../twin1 tip
--- a/tests/test-walk.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-walk.t Wed Oct 15 15:35:59 2014 -0400 @@ -310,11 +310,11 @@ Test listfile and listfile0 - $ python -c "file('listfile0', 'wb').write('fenugreek\0new\0')" + $ $PYTHON -c "file('listfile0', 'wb').write('fenugreek\0new\0')" $ hg debugwalk -I 'listfile0:listfile0' f fenugreek fenugreek f new new - $ python -c "file('listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')" + $ $PYTHON -c "file('listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')" $ hg debugwalk -I 'listfile:listfile' f fenugreek fenugreek f mammals/skunk mammals/skunk @@ -336,7 +336,7 @@ $ cd t $ echo fennel > overflow.list - $ python -c "for i in xrange(20000 / 100): print 'x' * 100" >> overflow.list + $ $PYTHON -c "for i in xrange(20000 / 100): print 'x' * 100" >> overflow.list $ echo fenugreek >> overflow.list $ hg debugwalk 'listfile:overflow.list' 2>&1 | grep -v '^xxx' f fennel fennel exact
--- a/tests/test-win32text.t Wed Oct 15 15:13:43 2014 -0400 +++ b/tests/test-win32text.t Wed Oct 15 15:35:59 2014 -0400 @@ -118,7 +118,7 @@ $ hg rem f $ hg ci -m 4 - $ python -c 'file("bin", "wb").write("hello\x00\x0D\x0A")' + $ $PYTHON -c 'file("bin", "wb").write("hello\x00\x0D\x0A")' $ hg add bin $ hg ci -m 5 $ hg log -v @@ -342,7 +342,7 @@ $ rm .hg/hgrc $ (echo some; echo text) > f3 - $ python -c 'file("f4.bat", "wb").write("rem empty\x0D\x0A")' + $ $PYTHON -c 'file("f4.bat", "wb").write("rem empty\x0D\x0A")' $ hg add f3 f4.bat $ hg ci -m 6 $ cat bin @@ -395,7 +395,7 @@ $ cat f4.bat rem empty\r (esc) - $ python -c 'file("f5.sh", "wb").write("# empty\x0D\x0A")' + $ $PYTHON -c 'file("f5.sh", "wb").write("# empty\x0D\x0A")' $ hg add f5.sh $ hg ci -m 7 $ cat f5.sh