From 3112944d5b251790c67dbd04a179d1aec1eb7372 Mon Sep 17 00:00:00 2001 From: Augie Fackler Date: Wed, 5 Jul 2017 11:10:11 -0500 Subject: [PATCH] tests: replace yet more calls to `python` with $PYTHON These are some simple cases. More to come in a future change. Reviewers: krbullock Reviewed By: krbullock Differential Revision: https://phab.mercurial-scm.org/D4 --- tests/test-bundle2-pushback.t | 2 +- tests/test-check-module-imports.t | 2 +- tests/test-clone-cgi.t | 4 ++-- tests/test-command-template.t | 2 +- tests/test-commit-interactive-curses.t | 2 +- tests/test-conflict.t | 2 +- tests/test-contrib.t | 30 +++++++++++++------------- tests/test-encoding-align.t | 2 +- tests/test-encoding.t | 2 +- tests/test-extension.t | 2 +- tests/test-help.t | 6 +++--- tests/test-hgweb-commands.t | 16 +++++++------- tests/test-histedit-arguments.t | 2 +- tests/test-imports-checker.t | 2 +- tests/test-largefiles.t | 2 +- tests/test-log.t | 4 ++-- tests/test-mq.t | 2 +- tests/test-newcgi.t | 6 +++--- tests/test-newercgi.t | 6 +++--- tests/test-oldcgi.t | 6 +++--- tests/test-parseindex.t | 4 ++-- tests/test-purge.t | 2 +- tests/test-push-cgi.t | 8 +++---- tests/test-push-race.t | 2 +- tests/test-revset.t | 4 ++-- tests/test-ssh-bundle1.t | 14 ++++++------ tests/test-ssh.t | 14 ++++++------ tests/test-tag.t | 4 ++-- 28 files changed, 77 insertions(+), 77 deletions(-) diff --git a/tests/test-bundle2-pushback.t b/tests/test-bundle2-pushback.t index d6f573715a..3f884da27e 100644 --- a/tests/test-bundle2-pushback.t +++ b/tests/test-bundle2-pushback.t @@ -25,7 +25,7 @@ $ cat >> $HGRCPATH < [ui] - > ssh = python "$TESTDIR/dummyssh" + > ssh = $PYTHON "$TESTDIR/dummyssh" > username = nobody > > [alias] diff --git a/tests/test-check-module-imports.t b/tests/test-check-module-imports.t index 3f67beb48f..6e1bea7baf 100644 --- a/tests/test-check-module-imports.t +++ b/tests/test-check-module-imports.t @@ -37,4 +37,4 @@ outputs, which should be fixed later. > -X tests/test-hgweb-no-path-info.t \ > -X tests/test-hgweb-no-request-uri.t \ > -X tests/test-hgweb-non-interactive.t \ - > | sed 's-\\-/-g' | python "$import_checker" - + > | sed 's-\\-/-g' | $PYTHON "$import_checker" - diff --git a/tests/test-clone-cgi.t b/tests/test-clone-cgi.t index d1f24541d7..c057c7cfed 100644 --- a/tests/test-clone-cgi.t +++ b/tests/test-clone-cgi.t @@ -26,13 +26,13 @@ try hgweb request $ . "$TESTDIR/cgienv" $ QUERY_STRING="cmd=changegroup&roots=0000000000000000000000000000000000000000"; export QUERY_STRING - $ python hgweb.cgi >page1 2>&1 + $ $PYTHON hgweb.cgi >page1 2>&1 $ $PYTHON "$TESTDIR/md5sum.py" page1 1f424bb22ec05c3c6bc866b6e67efe43 page1 make sure headers are sent even when there is no body - $ QUERY_STRING="cmd=listkeys&namespace=nosuchnamespace" python hgweb.cgi + $ QUERY_STRING="cmd=listkeys&namespace=nosuchnamespace" $PYTHON hgweb.cgi Status: 200 Script output follows\r (esc) Content-Type: application/mercurial-0.1\r (esc) Content-Length: 0\r (esc) diff --git a/tests/test-command-template.t b/tests/test-command-template.t index 41dda77e41..b31ea346cc 100644 --- a/tests/test-command-template.t +++ b/tests/test-command-template.t @@ -4253,7 +4253,7 @@ Set up repository for non-ascii encoding tests: $ hg init nonascii $ cd nonascii - $ python < open('latin1', 'w').write('\xe9') > open('utf-8', 'w').write('\xc3\xa9') > EOF diff --git a/tests/test-commit-interactive-curses.t b/tests/test-commit-interactive-curses.t index aed061a377..7beaea32c4 100644 --- a/tests/test-commit-interactive-curses.t +++ b/tests/test-commit-interactive-curses.t @@ -342,7 +342,7 @@ Check ui.interface logic for the chunkselector The default interface is text $ cp $HGRCPATH.pretest $HGRCPATH $ chunkselectorinterface() { - > python < $PYTHON < from mercurial import hg, ui;\ > repo = hg.repository(ui.ui.load(), ".");\ > print repo.ui.interface("chunkselector") diff --git a/tests/test-conflict.t b/tests/test-conflict.t index 76f8f5dbff..6cf3cb1584 100644 --- a/tests/test-conflict.t +++ b/tests/test-conflict.t @@ -120,7 +120,7 @@ Verify line splitting of custom conflict marker which causes multiple lines Verify line trimming of custom conflict marker using multi-byte characters $ hg up -q --clean . - $ python < fp = open('logfile', 'w') > fp.write('12345678901234567890123456789012345678901234567890' + > '1234567890') # there are 5 more columns for 80 columns diff --git a/tests/test-contrib.t b/tests/test-contrib.t index 7ce9afdc6a..f7356d8107 100644 --- a/tests/test-contrib.t +++ b/tests/test-contrib.t @@ -26,7 +26,7 @@ Prepare repo-a: Dumping revlog of file a to stdout: - $ python "$CONTRIBDIR/dumprevlog" .hg/store/data/a.i + $ $PYTHON "$CONTRIBDIR/dumprevlog" .hg/store/data/a.i file: .hg/store/data/a.i node: 183d2312b35066fb6b3b449b84efc370d50993d0 linkrev: 0 @@ -58,14 +58,14 @@ Dumping revlog of file a to stdout: Dump all revlogs to file repo.dump: - $ find .hg/store -name "*.i" | sort | xargs python "$CONTRIBDIR/dumprevlog" > ../repo.dump + $ find .hg/store -name "*.i" | sort | xargs $PYTHON "$CONTRIBDIR/dumprevlog" > ../repo.dump $ cd .. Undumping into repo-b: $ hg init repo-b $ cd repo-b - $ python "$CONTRIBDIR/undumprevlog" < ../repo.dump + $ $PYTHON "$CONTRIBDIR/undumprevlog" < ../repo.dump .hg/store/00changelog.i .hg/store/00manifest.i .hg/store/data/a.i @@ -115,7 +115,7 @@ Test simplemerge command: changing local directly - $ python simplemerge local base other && echo "merge succeeded" + $ $PYTHON simplemerge local base other && echo "merge succeeded" merge succeeded $ cat local local @@ -125,7 +125,7 @@ changing local directly printing to stdout - $ python simplemerge -p local base other + $ $PYTHON simplemerge -p local base other local base other @@ -144,7 +144,7 @@ conflicts $ echo end >> conflict-local $ echo end >> conflict-other - $ python simplemerge -p conflict-local base conflict-other + $ $PYTHON simplemerge -p conflict-local base conflict-other base <<<<<<< conflict-local not other @@ -156,7 +156,7 @@ conflicts 1 label - $ python simplemerge -p -L foo conflict-local base conflict-other + $ $PYTHON simplemerge -p -L foo conflict-local base conflict-other base <<<<<<< foo not other @@ -168,7 +168,7 @@ conflicts 2 labels - $ python simplemerge -p -L foo -L bar conflict-local base conflict-other + $ $PYTHON simplemerge -p -L foo -L bar conflict-local base conflict-other base <<<<<<< foo not other @@ -180,7 +180,7 @@ conflicts 3 labels - $ python simplemerge -p -L foo -L bar -L base conflict-local base conflict-other + $ $PYTHON simplemerge -p -L foo -L bar -L base conflict-local base conflict-other base <<<<<<< foo not other @@ -194,7 +194,7 @@ conflicts too many labels - $ python simplemerge -p -L foo -L bar -L baz -L buz conflict-local base conflict-other + $ $PYTHON simplemerge -p -L foo -L bar -L baz -L buz conflict-local base conflict-other abort: can only specify three labels. [255] @@ -202,13 +202,13 @@ binary file $ $PYTHON -c "f = file('binary-local', 'w'); f.write('\x00'); f.close()" $ cat orig >> binary-local - $ python simplemerge -p binary-local base other + $ $PYTHON simplemerge -p binary-local base other warning: binary-local looks like a binary file. [1] binary file --text - $ python simplemerge -a -p binary-local base other 2>&1 + $ $PYTHON simplemerge -a -p binary-local base other 2>&1 warning: binary-local looks like a binary file. \x00local (esc) base @@ -216,7 +216,7 @@ binary file --text help - $ python simplemerge --help + $ $PYTHON simplemerge --help simplemerge [OPTS] LOCAL BASE OTHER Simple three-way file merge utility with a minimal feature set. @@ -235,7 +235,7 @@ help wrong number of arguments - $ python simplemerge + $ $PYTHON simplemerge simplemerge: wrong number of arguments simplemerge [OPTS] LOCAL BASE OTHER @@ -256,7 +256,7 @@ wrong number of arguments bad option - $ python simplemerge --foo -p local base other + $ $PYTHON simplemerge --foo -p local base other simplemerge: option --foo not recognized simplemerge [OPTS] LOCAL BASE OTHER diff --git a/tests/test-encoding-align.t b/tests/test-encoding-align.t index e47b024827..d21dc99f8f 100644 --- a/tests/test-encoding-align.t +++ b/tests/test-encoding-align.t @@ -4,7 +4,7 @@ Test alignment of multibyte characters $ export HGENCODING $ hg init t $ cd t - $ python << EOF + $ $PYTHON << EOF > # (byte, width) = (6, 4) > s = "\xe7\x9f\xad\xe5\x90\x8d" > # (byte, width) = (7, 7): odd width is good for alignment test diff --git a/tests/test-encoding.t b/tests/test-encoding.t index eda4326b9a..3ae2f3b3c8 100644 --- a/tests/test-encoding.t +++ b/tests/test-encoding.t @@ -13,7 +13,7 @@ we need a repo with some legacy latin-1 changesets (run 'hg update' to get a working copy) $ hg co 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ python << EOF + $ $PYTHON << EOF > f = file('latin-1', 'w'); f.write("latin-1 e' encoded: \xe9"); f.close() > f = file('utf-8', 'w'); f.write("utf-8 e' encoded: \xc3\xa9"); f.close() > f = file('latin-1-tag', 'w'); f.write("\xe9"); f.close() diff --git a/tests/test-extension.t b/tests/test-extension.t index a682b117c4..a12279865c 100644 --- a/tests/test-extension.t +++ b/tests/test-extension.t @@ -123,7 +123,7 @@ Check hgweb's load order of extensions and registration of functions > EOF $ . "$TESTDIR/cgienv" - $ PATH_INFO='/' SCRIPT_NAME='' python hgweb.cgi \ + $ PATH_INFO='/' SCRIPT_NAME='' $PYTHON hgweb.cgi \ > | grep '^[0-9]) ' # ignores HTML output 1) foo imported 1) bar imported diff --git a/tests/test-help.t b/tests/test-help.t index 9e5c67881e..144bdeb259 100644 --- a/tests/test-help.t +++ b/tests/test-help.t @@ -1646,7 +1646,7 @@ replacement makes message meaningless. This tests that section lookup by translated string isn't broken by such str.lower(). - $ python < def escape(s): > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932')) > # translation of "record" in ja_JP.cp932 @@ -1680,7 +1680,7 @@ such str.lower(). > ambiguous = ./ambiguous.py > EOF - $ python < upper = "\x8bL\x98^" > print "hg --encoding cp932 help -e ambiguous.%s" % upper > EOF @@ -1690,7 +1690,7 @@ such str.lower(). Upper name should show only this message - $ python < lower = "\x8bl\x98^" > print "hg --encoding cp932 help -e ambiguous.%s" % lower > EOF diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t index 8aeaf6f6c4..c9507cd5bf 100644 --- a/tests/test-hgweb-commands.t +++ b/tests/test-hgweb-commands.t @@ -2265,7 +2265,7 @@ bookmarks view doesn't choke on bookmarks on secret changesets (issue3774) $ . "$TESTDIR/cgienv" $ PATH_INFO=/bookmarks; export PATH_INFO $ QUERY_STRING='style=raw' - $ python hgweb.cgi | grep -v ETag: + $ $PYTHON hgweb.cgi | grep -v ETag: Status: 200 Script output follows\r (esc) Content-Type: text/plain; charset=ascii\r (esc) \r (esc) @@ -2274,7 +2274,7 @@ listbookmarks hides secret bookmarks $ PATH_INFO=/; export PATH_INFO $ QUERY_STRING='cmd=listkeys&namespace=bookmarks' - $ python hgweb.cgi + $ $PYTHON hgweb.cgi Status: 200 Script output follows\r (esc) Content-Type: application/mercurial-0.1\r (esc) Content-Length: 0\r (esc) @@ -2284,7 +2284,7 @@ search works with filtering $ PATH_INFO=/log; export PATH_INFO $ QUERY_STRING='rev=babar' - $ python hgweb.cgi > search + $ $PYTHON hgweb.cgi > search $ grep Status search Status: 200 Script output follows\r (esc) @@ -2292,7 +2292,7 @@ summary works with filtering (issue3810) $ PATH_INFO=/summary; export PATH_INFO $ QUERY_STRING='style=monoblue'; export QUERY_STRING - $ python hgweb.cgi > summary.out + $ $PYTHON hgweb.cgi > summary.out $ grep "^Status" summary.out Status: 200 Script output follows\r (esc) @@ -2303,7 +2303,7 @@ proper status for filtered revision $ PATH_INFO=/rev/5; export PATH_INFO $ QUERY_STRING='style=raw' - $ python hgweb.cgi #> search + $ $PYTHON hgweb.cgi #> search Status: 404 Not Found\r (esc) ETag: W/"*"\r (glob) (esc) Content-Type: text/plain; charset=ascii\r (esc) @@ -2317,7 +2317,7 @@ proper status for filtered revision $ PATH_INFO=/rev/4; export PATH_INFO $ QUERY_STRING='style=raw' - $ python hgweb.cgi #> search + $ $PYTHON hgweb.cgi #> search Status: 404 Not Found\r (esc) ETag: W/"*"\r (glob) (esc) Content-Type: text/plain; charset=ascii\r (esc) @@ -2345,11 +2345,11 @@ filtered '0' changeset $ hg phase --force --secret 0 $ PATH_INFO=/graph/; export PATH_INFO $ QUERY_STRING='' - $ python hgweb.cgi | grep Status + $ $PYTHON hgweb.cgi | grep Status Status: 200 Script output follows\r (esc) (check rendered revision) $ QUERY_STRING='style=raw' - $ python hgweb.cgi | grep -v ETag + $ $PYTHON hgweb.cgi | grep -v ETag Status: 200 Script output follows\r (esc) Content-Type: text/plain; charset=ascii\r (esc) \r (esc) diff --git a/tests/test-histedit-arguments.t b/tests/test-histedit-arguments.t index 70d4e01b11..0d81625706 100644 --- a/tests/test-histedit-arguments.t +++ b/tests/test-histedit-arguments.t @@ -279,7 +279,7 @@ short hash. This tests issue3893. Test that trimming description using multi-byte characters -------------------------------------------------------------------- - $ python < fp = open('logfile', 'w') > fp.write('12345678901234567890123456789012345678901234567890' + > '12345') # there are 5 more columns for 80 columns diff --git a/tests/test-imports-checker.t b/tests/test-imports-checker.t index 0ecc14442f..1df7a47bfb 100644 --- a/tests/test-imports-checker.t +++ b/tests/test-imports-checker.t @@ -8,7 +8,7 @@ Run the doctests from the import checker, and make sure it's working correctly. $ TERM=dumb $ export TERM - $ python -m doctest $import_checker + $ $PYTHON -m doctest $import_checker Run additional tests for the import checker diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t index 4ac3defc24..ccb0fde240 100644 --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -225,7 +225,7 @@ Test largefiles can be loaded in hgweb (wrapcommand() shouldn't fail) $ . "$TESTDIR/cgienv" $ SCRIPT_NAME='' \ - > python "$TESTTMP/hgweb.cgi" > /dev/null + > $PYTHON "$TESTTMP/hgweb.cgi" > /dev/null Test archiving the various revisions. These hit corner cases known with archiving. diff --git a/tests/test-log.t b/tests/test-log.t index af8506acb1..29863a919a 100644 --- a/tests/test-log.t +++ b/tests/test-log.t @@ -1790,7 +1790,7 @@ test -u/-k for problematic encoding $ hg init problematicencoding $ cd problematicencoding - $ python > setup.sh < setup.sh < print u''' > echo a > text > hg add text @@ -1806,7 +1806,7 @@ test -u/-k for problematic encoding $ sh < setup.sh test in problematic encoding - $ python > test.sh < test.sh < print u''' > hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2' > echo ==== diff --git a/tests/test-mq.t b/tests/test-mq.t index d547308f90..a405b2203b 100644 --- a/tests/test-mq.t +++ b/tests/test-mq.t @@ -1584,7 +1584,7 @@ Test that secret mq patch does not break hgweb $ PATH_INFO=/tags; export PATH_INFO #endif $ QUERY_STRING='style=raw' - $ python hgweb.cgi | grep '^tip' + $ $PYTHON hgweb.cgi | grep '^tip' tip [0-9a-f]{40} (re) $ cd .. diff --git a/tests/test-newcgi.t b/tests/test-newcgi.t index ec2f120dfe..552bd1b6ab 100644 --- a/tests/test-newcgi.t +++ b/tests/test-newcgi.t @@ -52,15 +52,15 @@ before d74fc8dec2b4 still work. $ chmod 755 hgwebdir.cgi $ . "$TESTDIR/cgienv" - $ python hgweb.cgi > page1 - $ python hgwebdir.cgi > page2 + $ $PYTHON hgweb.cgi > page1 + $ $PYTHON hgwebdir.cgi > page2 $ PATH_INFO="/test/" $ PATH_TRANSLATED="/var/something/test.cgi" $ REQUEST_URI="/test/test/" $ SCRIPT_URI="http://hg.omnifarious.org/test/test/" $ SCRIPT_URL="/test/test/" - $ python hgwebdir.cgi > page3 + $ $PYTHON hgwebdir.cgi > page3 $ grep -i error page1 page2 page3 [1] diff --git a/tests/test-newercgi.t b/tests/test-newercgi.t index f9f78d5abc..386d481c2c 100644 --- a/tests/test-newercgi.t +++ b/tests/test-newercgi.t @@ -46,15 +46,15 @@ This is a rudimentary test of the CGI files as of d74fc8dec2b4. $ chmod 755 hgwebdir.cgi $ . "$TESTDIR/cgienv" - $ python hgweb.cgi > page1 - $ python hgwebdir.cgi > page2 + $ $PYTHON hgweb.cgi > page1 + $ $PYTHON hgwebdir.cgi > page2 $ PATH_INFO="/test/" $ PATH_TRANSLATED="/var/something/test.cgi" $ REQUEST_URI="/test/test/" $ SCRIPT_URI="http://hg.omnifarious.org/test/test/" $ SCRIPT_URL="/test/test/" - $ python hgwebdir.cgi > page3 + $ $PYTHON hgwebdir.cgi > page3 $ grep -i error page1 page2 page3 [1] diff --git a/tests/test-oldcgi.t b/tests/test-oldcgi.t index e8f14bb5bb..c437429b0e 100644 --- a/tests/test-oldcgi.t +++ b/tests/test-oldcgi.t @@ -62,15 +62,15 @@ This tests if CGI files from before d0db3462d568 still work. $ chmod 755 hgwebdir.cgi $ . "$TESTDIR/cgienv" - $ python hgweb.cgi > page1 - $ python hgwebdir.cgi > page2 + $ $PYTHON hgweb.cgi > page1 + $ $PYTHON hgwebdir.cgi > page2 $ PATH_INFO="/test/" $ PATH_TRANSLATED="/var/something/test.cgi" $ REQUEST_URI="/test/test/" $ SCRIPT_URI="http://hg.omnifarious.org/test/test/" $ SCRIPT_URL="/test/test/" - $ python hgwebdir.cgi > page3 + $ $PYTHON hgwebdir.cgi > page3 $ grep -i error page1 page2 page3 [1] diff --git a/tests/test-parseindex.t b/tests/test-parseindex.t index 98315e8498..286adb696a 100644 --- a/tests/test-parseindex.t +++ b/tests/test-parseindex.t @@ -66,7 +66,7 @@ Test SEGV caused by bad revision passed to reachableroots() (issue4775): $ cd a - $ python < from mercurial import changelog, vfs > cl = changelog.changelog(vfs.vfs('.hg/store')) > print 'good heads:' @@ -128,7 +128,7 @@ Test corrupted p1/p2 fields that could cause SEGV at parsers.c: $ hg clone --pull -q --config phases.publish=False ../a segv $ rm -R limit/.hg/cache segv/.hg/cache - $ python < data = open("limit/.hg/store/00changelog.i", "rb").read() > for n, p in [('limit', '\0\0\0\x02'), ('segv', '\0\x01\0\0')]: > # corrupt p1 at rev0 and p2 at rev1 diff --git a/tests/test-purge.t b/tests/test-purge.t index fa878a5d2f..8ba43b9128 100644 --- a/tests/test-purge.t +++ b/tests/test-purge.t @@ -49,7 +49,7 @@ delete an untracked file $ touch untracked_file $ touch untracked_file_readonly - $ python < import os, stat > f= 'untracked_file_readonly' > os.chmod(f, stat.S_IMODE(os.stat(f).st_mode) & ~stat.S_IWRITE) diff --git a/tests/test-push-cgi.t b/tests/test-push-cgi.t index ad47e17680..2afe9bad31 100644 --- a/tests/test-push-cgi.t +++ b/tests/test-push-cgi.t @@ -38,7 +38,7 @@ test preparation expect failure because heads doesn't match (formerly known as 'unsynced changes') $ QUERY_STRING="cmd=unbundle&heads=0000000000000000000000000000000000000000"; export QUERY_STRING - $ python hgweb.cgi page1 2>&1 + $ $PYTHON hgweb.cgi page1 2>&1 $ cat page1 Status: 200 Script output follows\r (esc) Content-Type: application/mercurial-0.1\r (esc) @@ -50,7 +50,7 @@ expect failure because heads doesn't match (formerly known as 'unsynced changes' successful force push $ QUERY_STRING="cmd=unbundle&heads=666f726365"; export QUERY_STRING - $ python hgweb.cgi page2 2>&1 + $ $PYTHON hgweb.cgi page2 2>&1 $ cat page2 Status: 200 Script output follows\r (esc) Content-Type: application/mercurial-0.1\r (esc) @@ -65,7 +65,7 @@ successful force push successful push, list of heads $ QUERY_STRING="cmd=unbundle&heads=f7b1eb17ad24730a1651fccd46c43826d1bbc2ac"; export QUERY_STRING - $ python hgweb.cgi page3 2>&1 + $ $PYTHON hgweb.cgi page3 2>&1 $ cat page3 Status: 200 Script output follows\r (esc) Content-Type: application/mercurial-0.1\r (esc) @@ -80,7 +80,7 @@ successful push, list of heads successful push, SHA1 hash of heads (unbundlehash capability) $ QUERY_STRING="cmd=unbundle&heads=686173686564 5a785a5f9e0d433b88ed862b206b011b0c3a9d13"; export QUERY_STRING - $ python hgweb.cgi page4 2>&1 + $ $PYTHON hgweb.cgi page4 2>&1 $ cat page4 Status: 200 Script output follows\r (esc) Content-Type: application/mercurial-0.1\r (esc) diff --git a/tests/test-push-race.t b/tests/test-push-race.t index 58c9c1ac7d..dc6f06bdbc 100644 --- a/tests/test-push-race.t +++ b/tests/test-push-race.t @@ -91,7 +91,7 @@ A set of extension and shell functions ensures this scheduling. $ cat >> $HGRCPATH << EOF > [ui] - > ssh = python "$TESTDIR/dummyssh" + > ssh = $PYTHON "$TESTDIR/dummyssh" > # simplify output > logtemplate = {node|short} {desc} ({branch}) > [phases] diff --git a/tests/test-revset.t b/tests/test-revset.t index 6c8f370a17..2002ff54dd 100644 --- a/tests/test-revset.t +++ b/tests/test-revset.t @@ -4180,7 +4180,7 @@ test author/desc/keyword in problematic encoding $ hg init problematicencoding $ cd problematicencoding - $ python > setup.sh < setup.sh < print u''' > echo a > text > hg add text @@ -4196,7 +4196,7 @@ test author/desc/keyword in problematic encoding $ sh < setup.sh test in problematic encoding - $ python > test.sh < test.sh < print u''' > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30A2)' > echo ==== diff --git a/tests/test-ssh-bundle1.t b/tests/test-ssh-bundle1.t index 283b4e91d7..243684c445 100644 --- a/tests/test-ssh-bundle1.t +++ b/tests/test-ssh-bundle1.t @@ -145,7 +145,7 @@ updating rc $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc $ echo "[ui]" >> .hg/hgrc - $ echo "ssh = python \"$TESTDIR/dummyssh\"" >> .hg/hgrc + $ echo "ssh = $PYTHON \"$TESTDIR/dummyssh\"" >> .hg/hgrc find outgoing @@ -272,7 +272,7 @@ a bad, evil hook that prints to stdout > EOF $ echo '[hooks]' >> ../remote/.hg/hgrc - $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc + $ echo "changegroup.stdout = $PYTHON $TESTTMP/badhook" >> ../remote/.hg/hgrc $ echo r > r $ hg ci -A -m z r @@ -363,7 +363,7 @@ parameters: > export SSH_ORIGINAL_COMMAND > PYTHONPATH="$PYTHONPATH" > export PYTHONPATH - > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" + > $PYTHON "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" > EOF $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" @@ -379,7 +379,7 @@ parameters: abort: no suitable response from remote hg! [255] - $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" python "$TESTDIR/../contrib/hg-ssh" + $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh" Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation [255] @@ -391,7 +391,7 @@ Test hg-ssh in read-only mode: > export SSH_ORIGINAL_COMMAND > PYTHONPATH="$PYTHONPATH" > export PYTHONPATH - > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" + > $PYTHON "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" > EOF $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local @@ -440,7 +440,7 @@ stderr from remote commands should be printed before stdout from local code (iss > [paths] > default-push = ssh://user@dummy/remote > [ui] - > ssh = python "$TESTDIR/dummyssh" + > ssh = $PYTHON "$TESTDIR/dummyssh" > [extensions] > localwrite = localwrite.py > EOF @@ -461,7 +461,7 @@ debug output $ hg pull --debug ssh://user@dummy/remote pulling from ssh://user@dummy/remote - running python ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re) + running .* ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re) sending hello command sending between command remote: 355 diff --git a/tests/test-ssh.t b/tests/test-ssh.t index 536b431f13..654b35a312 100644 --- a/tests/test-ssh.t +++ b/tests/test-ssh.t @@ -139,7 +139,7 @@ updating rc $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc $ echo "[ui]" >> .hg/hgrc - $ echo "ssh = python \"$TESTDIR/dummyssh\"" >> .hg/hgrc + $ echo "ssh = $PYTHON \"$TESTDIR/dummyssh\"" >> .hg/hgrc find outgoing @@ -273,7 +273,7 @@ a bad, evil hook that prints to stdout $ cat <> ../remote/.hg/hgrc > [hooks] - > changegroup.stdout = python $TESTTMP/badhook + > changegroup.stdout = $PYTHON $TESTTMP/badhook > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook > EOF $ echo r > r @@ -380,7 +380,7 @@ parameters: > export SSH_ORIGINAL_COMMAND > PYTHONPATH="$PYTHONPATH" > export PYTHONPATH - > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" + > $PYTHON "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" > EOF $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" @@ -396,7 +396,7 @@ parameters: abort: no suitable response from remote hg! [255] - $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh" + $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh" Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation [255] @@ -408,7 +408,7 @@ Test hg-ssh in read-only mode: > export SSH_ORIGINAL_COMMAND > PYTHONPATH="$PYTHONPATH" > export PYTHONPATH - > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" + > $PYTHON "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" > EOF $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local @@ -455,7 +455,7 @@ stderr from remote commands should be printed before stdout from local code (iss > [paths] > default-push = ssh://user@dummy/remote > [ui] - > ssh = python "$TESTDIR/dummyssh" + > ssh = $PYTHON "$TESTDIR/dummyssh" > [extensions] > localwrite = localwrite.py > EOF @@ -477,7 +477,7 @@ debug output $ hg pull --debug ssh://user@dummy/remote pulling from ssh://user@dummy/remote - running python ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re) + running .* ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re) sending hello command sending between command remote: 355 diff --git a/tests/test-tag.t b/tests/test-tag.t index 057cb48ef5..a862631a26 100644 --- a/tests/test-tag.t +++ b/tests/test-tag.t @@ -230,7 +230,7 @@ cloning local tags Issue601: hg tag doesn't do the right thing if .hgtags or localtags doesn't end with EOL - $ python << EOF + $ $PYTHON << EOF > f = file('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close() > f = file('.hg/localtags', 'w'); f.write(last); f.close() > EOF @@ -242,7 +242,7 @@ doesn't end with EOL c2899151f4e76890c602a2597a650a72666681bf localnewline - $ python << EOF + $ $PYTHON << EOF > f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close() > f = file('.hgtags', 'w'); f.write(last); f.close() > EOF