mirror of
https://github.com/facebook/sapling.git
synced 2025-01-07 14:10:42 +03:00
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
This commit is contained in:
parent
82b2cf516f
commit
3112944d5b
@ -25,7 +25,7 @@
|
||||
|
||||
$ cat >> $HGRCPATH <<EOF
|
||||
> [ui]
|
||||
> ssh = python "$TESTDIR/dummyssh"
|
||||
> ssh = $PYTHON "$TESTDIR/dummyssh"
|
||||
> username = nobody <no.reply@example.com>
|
||||
>
|
||||
> [alias]
|
||||
|
@ -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" -
|
||||
|
@ -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)
|
||||
|
@ -4253,7 +4253,7 @@ Set up repository for non-ascii encoding tests:
|
||||
|
||||
$ hg init nonascii
|
||||
$ cd nonascii
|
||||
$ python <<EOF
|
||||
$ $PYTHON <<EOF
|
||||
> open('latin1', 'w').write('\xe9')
|
||||
> open('utf-8', 'w').write('\xc3\xa9')
|
||||
> EOF
|
||||
|
@ -342,7 +342,7 @@ Check ui.interface logic for the chunkselector
|
||||
The default interface is text
|
||||
$ cp $HGRCPATH.pretest $HGRCPATH
|
||||
$ chunkselectorinterface() {
|
||||
> python <<EOF
|
||||
> $PYTHON <<EOF
|
||||
> from mercurial import hg, ui;\
|
||||
> repo = hg.repository(ui.ui.load(), ".");\
|
||||
> print repo.ui.interface("chunkselector")
|
||||
|
@ -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 <<EOF
|
||||
$ $PYTHON <<EOF
|
||||
> fp = open('logfile', 'w')
|
||||
> fp.write('12345678901234567890123456789012345678901234567890' +
|
||||
> '1234567890') # there are 5 more columns for 80 columns
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -1646,7 +1646,7 @@ replacement makes message meaningless.
|
||||
This tests that section lookup by translated string isn't broken by
|
||||
such str.lower().
|
||||
|
||||
$ python <<EOF
|
||||
$ $PYTHON <<EOF
|
||||
> 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 <<EOF | sh
|
||||
$ $PYTHON <<EOF | sh
|
||||
> 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 <<EOF | sh
|
||||
$ $PYTHON <<EOF | sh
|
||||
> lower = "\x8bl\x98^"
|
||||
> print "hg --encoding cp932 help -e ambiguous.%s" % lower
|
||||
> EOF
|
||||
|
@ -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)
|
||||
|
@ -279,7 +279,7 @@ short hash. This tests issue3893.
|
||||
Test that trimming description using multi-byte characters
|
||||
--------------------------------------------------------------------
|
||||
|
||||
$ python <<EOF
|
||||
$ $PYTHON <<EOF
|
||||
> fp = open('logfile', 'w')
|
||||
> fp.write('12345678901234567890123456789012345678901234567890' +
|
||||
> '12345') # there are 5 more columns for 80 columns
|
||||
|
@ -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
|
||||
|
||||
|
@ -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.
|
||||
|
@ -1790,7 +1790,7 @@ test -u/-k for problematic encoding
|
||||
$ hg init problematicencoding
|
||||
$ cd problematicencoding
|
||||
|
||||
$ python > setup.sh <<EOF
|
||||
$ $PYTHON > setup.sh <<EOF
|
||||
> 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 <<EOF
|
||||
$ $PYTHON > test.sh <<EOF
|
||||
> print u'''
|
||||
> hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2'
|
||||
> echo ====
|
||||
|
@ -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 ..
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -66,7 +66,7 @@ Test SEGV caused by bad revision passed to reachableroots() (issue4775):
|
||||
|
||||
$ cd a
|
||||
|
||||
$ python <<EOF
|
||||
$ $PYTHON <<EOF
|
||||
> 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 <<EOF
|
||||
$ $PYTHON <<EOF
|
||||
> 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
|
||||
|
@ -49,7 +49,7 @@ delete an untracked file
|
||||
|
||||
$ touch untracked_file
|
||||
$ touch untracked_file_readonly
|
||||
$ python <<EOF
|
||||
$ $PYTHON <<EOF
|
||||
> import os, stat
|
||||
> f= 'untracked_file_readonly'
|
||||
> os.chmod(f, stat.S_IMODE(os.stat(f).st_mode) & ~stat.S_IWRITE)
|
||||
|
@ -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 <bundle.hg >page1 2>&1
|
||||
$ $PYTHON hgweb.cgi <bundle.hg >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 <bundle.hg >page2 2>&1
|
||||
$ $PYTHON hgweb.cgi <bundle.hg >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 <bundle.hg >page3 2>&1
|
||||
$ $PYTHON hgweb.cgi <bundle.hg >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 <bundle.hg >page4 2>&1
|
||||
$ $PYTHON hgweb.cgi <bundle.hg >page4 2>&1
|
||||
$ cat page4
|
||||
Status: 200 Script output follows\r (esc)
|
||||
Content-Type: application/mercurial-0.1\r (esc)
|
||||
|
@ -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]
|
||||
|
@ -4180,7 +4180,7 @@ test author/desc/keyword in problematic encoding
|
||||
$ hg init problematicencoding
|
||||
$ cd problematicencoding
|
||||
|
||||
$ python > setup.sh <<EOF
|
||||
$ $PYTHON > setup.sh <<EOF
|
||||
> 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 <<EOF
|
||||
$ $PYTHON > test.sh <<EOF
|
||||
> print u'''
|
||||
> hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30A2)'
|
||||
> echo ====
|
||||
|
@ -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
|
||||
|
@ -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 <<EOF >> ../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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user