tests: make tests work if directory contains special characters

With this quoting tests will work e.g. in "/tmp/foo bar/mercurial/".
This commit is contained in:
Thomas Arendsen Hein 2012-04-03 19:06:35 +02:00
parent 10f14ea780
commit 21bb7c4cdc
36 changed files with 108 additions and 108 deletions

View File

@ -18,7 +18,7 @@ files
$ cd "$origdir"
$ cd archive
$ $TESTDIR/readlink.py dangling
$ "$TESTDIR/readlink.py" dangling
dangling -> nothing
tar
@ -26,7 +26,7 @@ tar
$ cd "$origdir"
$ tar xf archive.tar
$ cd tar
$ $TESTDIR/readlink.py dangling
$ "$TESTDIR/readlink.py" dangling
dangling -> nothing
zip
@ -34,5 +34,5 @@ zip
$ cd "$origdir"
$ unzip archive.zip > /dev/null
$ cd zip
$ $TESTDIR/readlink.py dangling
$ "$TESTDIR/readlink.py" dangling
dangling -> nothing

View File

@ -221,7 +221,7 @@ enable progress extension:
> width = 60
> EOF
$ hg archive ../with-progress 2>&1 | $TESTDIR/filtercr.py
$ hg archive ../with-progress 2>&1 | "$TESTDIR/filtercr.py"
archiving [ ] 0/4
archiving [ ] 0/4

View File

@ -35,7 +35,7 @@ unbundle tampered bundle
$ hg init target
$ cd target
$ hg unbundle $TESTDIR/bundles/tampered.hg
$ hg unbundle "$TESTDIR/bundles/tampered.hg"
adding changesets
adding manifests
adding file changes

View File

@ -1,6 +1,6 @@
$ hg init test
$ cd test
$ hg unbundle $TESTDIR/bundles/remote.hg
$ hg unbundle "$TESTDIR/bundles/remote.hg"
adding changesets
adding manifests
adding file changes

View File

@ -1,6 +1,6 @@
$ "$TESTDIR/hghave" pyflakes || exit 80
$ cd `dirname $TESTDIR`
$ pyflakes mercurial hgext 2>&1 | $TESTDIR/filterpyflakes.py
$ cd "`dirname "$TESTDIR"`"
$ pyflakes mercurial hgext 2>&1 | "$TESTDIR/filterpyflakes.py"
hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob)

View File

@ -1,6 +1,6 @@
Set vars:
$ CONTRIBDIR=$TESTDIR/../contrib
$ CONTRIBDIR="$TESTDIR/../contrib"
Prepare repo-a:
@ -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
@ -106,7 +106,7 @@ Compare repos:
Test shrink-revlog:
$ cd repo-a
$ hg --config extensions.shrink=$CONTRIBDIR/shrink-revlog.py shrink
$ hg --config extensions.shrink="$CONTRIBDIR/shrink-revlog.py" shrink
shrinking $TESTTMP/repo-a/.hg/store/00manifest.i (glob)
reading revs
sorting revs

View File

@ -101,7 +101,7 @@ return to trunk and merge MYBRANCH1_2
Merging differences between 1.1 and 1.1.2.2.2.1 into foo.txt
$ cvsci -m "merge2" foo.txt
$ REALCVS=`which cvs`
$ echo "for x in \$*; do if [ \"\$x\" = \"rlog\" ]; then echo \"RCS file: $CVSROOT/foo/foo.txt,v\"; cat $TESTDIR/test-convert-cvsnt-mergepoints.rlog; exit 0; fi; done; $REALCVS \$*" > ../cvs
$ echo "for x in \$*; do if [ \"\$x\" = \"rlog\" ]; then echo \"RCS file: $CVSROOT/foo/foo.txt,v\"; cat \"$TESTDIR/test-convert-cvsnt-mergepoints.rlog\"; exit 0; fi; done; $REALCVS \$*" > ../cvs
$ chmod +x ../cvs
$ PATH=..:${PATH} hg debugcvsps --parents foo
collecting CVS rlog

View File

@ -173,7 +173,7 @@ Test convert progress bar'
> width = 60
> EOF
$ hg convert svn-repo hg-progress 2>&1 | $TESTDIR/filtercr.py
$ hg convert svn-repo hg-progress 2>&1 | "$TESTDIR/filtercr.py"
scanning [ <=> ] 1
scanning [ <=> ] 2

View File

@ -78,13 +78,13 @@ this should show the rename information in the metadata
copy: a
copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
$ $TESTDIR/md5sum.py .hg/store/data/b.i
$ "$TESTDIR/md5sum.py" .hg/store/data/b.i
4999f120a3b88713bbefddd195cf5133 .hg/store/data/b.i
$ hg cat b > bsum
$ $TESTDIR/md5sum.py bsum
$ "$TESTDIR/md5sum.py" bsum
60b725f10c9c85c70d97880dfe8191b3 bsum
$ hg cat a > asum
$ $TESTDIR/md5sum.py asum
$ "$TESTDIR/md5sum.py" asum
60b725f10c9c85c70d97880dfe8191b3 asum
$ hg verify
checking changesets

View File

@ -8,7 +8,7 @@ plain
> --config extensions.progress= --config progress.assume-tty=1 \
> --config progress.delay=0 --config progress.refresh=0 \
> --config progress.width=60 2>&1 | \
> python $TESTDIR/filtercr.py
> python "$TESTDIR/filtercr.py"
building [ ] 0/12
building [ ] 0/12

View File

@ -1,6 +1,6 @@
$ hg init a
$ cd a
$ cp $TESTDIR/binfile.bin .
$ cp "$TESTDIR/binfile.bin" .
$ hg add binfile.bin
$ hg ci -m 'add binfile.bin'

View File

@ -5,7 +5,7 @@ Test character encoding
we need a repo with some legacy latin-1 changesets
$ hg unbundle $TESTDIR/bundles/legacy-encoding.hg
$ hg unbundle "$TESTDIR/bundles/legacy-encoding.hg"
adding changesets
adding manifests
adding file changes

View File

@ -3,18 +3,18 @@ Test document extraction
$ "$TESTDIR/hghave" docutils || exit 80
$ HGENCODING=UTF-8
$ export HGENCODING
$ for PO in C $TESTDIR/../i18n/*.po; do
> LOCALE=`basename $PO .po`
$ { echo C; find "$TESTDIR/../i18n" -name "*.po" | sort; } | while read PO; do
> LOCALE=`basename "$PO" .po`
> echo
> echo "% extracting documentation from $LOCALE"
> echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
> echo "" >> gendoc-$LOCALE.txt
> LC_ALL=$LOCALE python $TESTDIR/../doc/gendoc.py >> gendoc-$LOCALE.txt 2> /dev/null || exit
> LC_ALL=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
>
> # We call runrst without adding "--halt warning" to make it report
> # all errors instead of stopping on the first one.
> echo "checking for parse errors"
> python $TESTDIR/../doc/runrst html gendoc-$LOCALE.txt /dev/null
> python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
> done
% extracting documentation from C

View File

@ -96,7 +96,7 @@ Nonexistent in tip+chmod:
Binary diff:
$ cp $TESTDIR/binfile.bin .
$ cp "$TESTDIR/binfile.bin" .
$ hg add binfile.bin
$ hg diff --git > b.diff
$ cat b.diff
@ -125,7 +125,7 @@ Import binary diff:
$ rm binfile.bin
$ hg import -mfoo b.diff
applying b.diff
$ cmp binfile.bin $TESTDIR/binfile.bin
$ cmp binfile.bin "$TESTDIR/binfile.bin"
Rename binary file:

View File

@ -6,7 +6,7 @@ Test the GPG extension
> gpg=
>
> [gpg]
> cmd=gpg --no-permission-warning --no-secmem-warning --no-auto-check-trustdb --homedir $TESTDIR/gpg
> cmd=gpg --no-permission-warning --no-secmem-warning --no-auto-check-trustdb --homedir "$TESTDIR/gpg"
> EOF
$ hg init r
$ cd r

View File

@ -165,7 +165,7 @@ of just using revision numbers.
$ hg init a
$ cd a
$ cp $TESTDIR/binfile.bin .
$ cp "$TESTDIR/binfile.bin" .
$ hg add binfile.bin
$ hg ci -m 'add binfile.bin'
$ hg grep "MaCam" --all

View File

@ -4,7 +4,7 @@ creating 'remote
$ hg init remote
$ cd remote
$ hg unbundle $TESTDIR/bundles/remote.hg
$ hg unbundle "$TESTDIR/bundles/remote.hg"
adding changesets
adding manifests
adding file changes

View File

@ -61,7 +61,7 @@ test failure
init+push to remote2
$ hg init -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote2
$ hg init -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote2
$ hg incoming -R remote2 local
comparing with local
changeset: 0:08b9e9f63b32
@ -71,7 +71,7 @@ init+push to remote2
summary: init
$ hg push -R local -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote2
$ hg push -R local -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote2
pushing to ssh://user@dummy/remote2
searching for changes
remote: adding changesets
@ -81,7 +81,7 @@ init+push to remote2
clone to remote1
$ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote1
$ hg clone -e 'python "$TESTDIR/dummyssh"' local ssh://user@dummy/remote1
searching for changes
remote: adding changesets
remote: adding manifests
@ -90,14 +90,14 @@ clone to remote1
init to existing repo
$ hg init -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote1
$ hg init -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote1
abort: repository remote1 already exists!
abort: could not create remote repo!
[255]
clone to existing repo
$ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote1
$ hg clone -e 'python "$TESTDIR/dummyssh"' local ssh://user@dummy/remote1
abort: repository remote1 already exists!
abort: could not create remote repo!
[255]
@ -186,7 +186,7 @@ clone bookmarks
$ hg -R local bookmark test
$ hg -R local bookmarks
* test 0:08b9e9f63b32
$ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote-bookmarks
$ hg clone -e 'python "$TESTDIR/dummyssh"' local ssh://user@dummy/remote-bookmarks
searching for changes
remote: adding changesets
remote: adding manifests

View File

@ -907,14 +907,14 @@ hg serve
$ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
$ $TESTDIR/get-with-headers.py localhost:$HGPORT '/file/tip/a/?style=raw'
$ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/a/?style=raw'
200 Script output follows
expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
do not process $Id:
xxx $
$Xinfo: User Name <user@example.com>: firstline $
$ $TESTDIR/get-with-headers.py localhost:$HGPORT '/annotate/tip/a/?style=raw'
$ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/a/?style=raw'
200 Script output follows
@ -926,7 +926,7 @@ hg serve
$ $TESTDIR/get-with-headers.py localhost:$HGPORT '/rev/tip/?style=raw'
$ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip/?style=raw'
200 Script output follows
@ -946,7 +946,7 @@ hg serve
+xxx $
+$Xinfo$
$ $TESTDIR/get-with-headers.py localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
$ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
200 Script output follows

View File

@ -843,7 +843,7 @@ used all HGPORTs, kill all daemons
$ "$TESTDIR/killdaemons.py"
vanilla clients locked out from largefiles ssh repos
$ hg --config extensions.largefiles=! clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/r4 r5
$ hg --config extensions.largefiles=! clone -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/r4 r5
abort: remote error:
This repository uses the largefiles extension.

View File

@ -11,7 +11,7 @@
$ echo ccc > c
$ hg add a b c
$ hg qrefresh
$ $TESTDIR/readlink.py a
$ "$TESTDIR/readlink.py" a
a -> a not a symlink
@ -21,7 +21,7 @@ test replacing a file with a symlink
$ rm a
$ ln -s b a
$ hg qrefresh --git
$ $TESTDIR/readlink.py a
$ "$TESTDIR/readlink.py" a
a -> b
$ hg qpop
@ -30,7 +30,7 @@ test replacing a file with a symlink
$ hg qpush
applying symlink.patch
now at: symlink.patch
$ $TESTDIR/readlink.py a
$ "$TESTDIR/readlink.py" a
a -> b
@ -39,7 +39,7 @@ test updating a symlink
$ rm a
$ ln -s c a
$ hg qnew --git -f updatelink
$ $TESTDIR/readlink.py a
$ "$TESTDIR/readlink.py" a
a -> c
$ hg qpop
popping updatelink
@ -49,7 +49,7 @@ test updating a symlink
patching file a
a
now at: updatelink
$ $TESTDIR/readlink.py a
$ "$TESTDIR/readlink.py" a
a -> c
$ hg st
@ -104,5 +104,5 @@ replace broken symlink with another broken symlink
$ hg qpush
applying movelink
now at: movelink
$ $TESTDIR/readlink.py linkb
$ "$TESTDIR/readlink.py" linkb
linkb -> linkb

View File

@ -154,7 +154,7 @@
> --config extensions.progress= --config progress.assume-tty=1 \
> --config progress.delay=0 --config progress.refresh=0 \
> --config progress.width=60 2>&1 | \
> python $TESTDIR/filtercr.py
> python "$TESTDIR/filtercr.py"
This patch series consists of 2 patches.

View File

@ -46,14 +46,14 @@
test default params, display nothing because of delay
$ hg -y loop 3 2>&1 | $TESTDIR/filtercr.py
$ hg -y loop 3 2>&1 | "$TESTDIR/filtercr.py"
$ echo "delay=0" >> $HGRCPATH
$ echo "refresh=0" >> $HGRCPATH
test with delay=0, refresh=0
$ hg -y loop 3 2>&1 | $TESTDIR/filtercr.py
$ hg -y loop 3 2>&1 | "$TESTDIR/filtercr.py"
loop [ ] 0/3
loop [===============> ] 1/3
@ -64,7 +64,7 @@ test with delay=0, refresh=0
test nested short-lived topics (which shouldn't display with nestdelay):
$ hg -y loop 3 --nested 2>&1 | \
> python $TESTDIR/filtercr.py
> python "$TESTDIR/filtercr.py"
loop [ ] 0/3
loop [===============> ] 1/3
@ -73,7 +73,7 @@ test nested short-lived topics (which shouldn't display with nestdelay):
$ hg --config progress.changedelay=0 -y loop 3 --nested 2>&1 | \
> python $TESTDIR/filtercr.py
> python "$TESTDIR/filtercr.py"
loop [ ] 0/3
nested [ ] 0/2
@ -90,7 +90,7 @@ test nested short-lived topics (which shouldn't display with nestdelay):
test two topics being printed in parallel (as when we're doing a local
--pull clone, where you get the unbundle and bundle progress at the
same time):
$ hg loop 3 --parallel 2>&1 | python $TESTDIR/filtercr.py
$ hg loop 3 --parallel 2>&1 | python "$TESTDIR/filtercr.py"
loop [ ] 0/3
loop [===============> ] 1/3
@ -98,13 +98,13 @@ same time):
\r (esc)
test refresh is taken in account
$ hg -y --config progress.refresh=100 loop 3 2>&1 | $TESTDIR/filtercr.py
$ hg -y --config progress.refresh=100 loop 3 2>&1 | "$TESTDIR/filtercr.py"
test format options 1
$ hg -y --config 'progress.format=number topic item+2' loop 2 2>&1 \
> | $TESTDIR/filtercr.py
> | "$TESTDIR/filtercr.py"
0/2 loop lo
1/2 loop lo
@ -113,7 +113,7 @@ test format options 1
test format options 2
$ hg -y --config 'progress.format=number item-3 bar' loop 2 2>&1 \
> | $TESTDIR/filtercr.py
> | "$TESTDIR/filtercr.py"
0/2 p.0 [ ]
1/2 p.1 [=======================> ]
@ -122,7 +122,7 @@ test format options 2
test format options and indeterminate progress
$ hg -y --config 'progress.format=number item bar' loop -- -2 2>&1 \
> | $TESTDIR/filtercr.py
> | "$TESTDIR/filtercr.py"
0 loop.0 [ <=> ]
1 loop.1 [ <=> ]
@ -130,7 +130,7 @@ test format options and indeterminate progress
make sure things don't fall over if count > total
$ hg -y loop --total 4 6 2>&1 | $TESTDIR/filtercr.py
$ hg -y loop --total 4 6 2>&1 | "$TESTDIR/filtercr.py"
loop [ ] 0/4
loop [===========> ] 1/4
@ -142,7 +142,7 @@ make sure things don't fall over if count > total
test immediate progress completion
$ hg -y loop 0 2>&1 | $TESTDIR/filtercr.py
$ hg -y loop 0 2>&1 | "$TESTDIR/filtercr.py"
test delay time estimates
@ -173,7 +173,7 @@ test delay time estimates
$ echo "delay=25" >> $HGRCPATH
$ echo "width=60" >> $HGRCPATH
$ hg -y loop 8 2>&1 | python $TESTDIR/filtercr.py
$ hg -y loop 8 2>&1 | python "$TESTDIR/filtercr.py"
loop [=========> ] 2/8 1m07s
loop [===============> ] 3/8 56s
@ -183,7 +183,7 @@ test delay time estimates
loop [=====================================> ] 7/8 12s
\r (esc)
$ MOCKTIME=10000 hg -y loop 4 2>&1 | python $TESTDIR/filtercr.py
$ MOCKTIME=10000 hg -y loop 4 2>&1 | python "$TESTDIR/filtercr.py"
loop [ ] 0/4
loop [=========> ] 1/4 8h21m
@ -191,7 +191,7 @@ test delay time estimates
loop [==============================> ] 3/4 2h47m
\r (esc)
$ MOCKTIME=1000000 hg -y loop 4 2>&1 | python $TESTDIR/filtercr.py
$ MOCKTIME=1000000 hg -y loop 4 2>&1 | python "$TESTDIR/filtercr.py"
loop [ ] 0/4
loop [=========> ] 1/4 5w00d
@ -200,7 +200,7 @@ test delay time estimates
\r (esc)
$ MOCKTIME=14000000 hg -y loop 4 2>&1 | python $TESTDIR/filtercr.py
$ MOCKTIME=14000000 hg -y loop 4 2>&1 | python "$TESTDIR/filtercr.py"
loop [ ] 0/4
loop [=========> ] 1/4 1y18w
@ -209,7 +209,7 @@ test delay time estimates
\r (esc)
Time estimates should not fail when there's no end point:
$ hg -y loop -- -4 2>&1 | python $TESTDIR/filtercr.py
$ hg -y loop -- -4 2>&1 | python "$TESTDIR/filtercr.py"
loop [ <=> ] 2
loop [ <=> ] 3

View File

@ -1,6 +1,6 @@
$ hg init test
$ cd test
$ hg unbundle $TESTDIR/bundles/remote.hg
$ hg unbundle "$TESTDIR/bundles/remote.hg"
adding changesets
adding manifests
adding file changes

View File

@ -15,7 +15,7 @@ Create repo a:
$ hg init a
$ cd a
$ hg unbundle $TESTDIR/bundles/rebase.hg
$ hg unbundle "$TESTDIR/bundles/rebase.hg"
adding changesets
adding manifests
adding file changes

View File

@ -13,7 +13,7 @@
$ hg init a
$ cd a
$ hg unbundle $TESTDIR/bundles/rebase.hg
$ hg unbundle "$TESTDIR/bundles/rebase.hg"
adding changesets
adding manifests
adding file changes

View File

@ -12,7 +12,7 @@
$ hg init a
$ cd a
$ hg unbundle $TESTDIR/bundles/rebase.hg
$ hg unbundle "$TESTDIR/bundles/rebase.hg"
adding changesets
adding manifests
adding file changes

View File

@ -13,7 +13,7 @@
$ hg init a
$ cd a
$ hg unbundle $TESTDIR/bundles/rebase.hg
$ hg unbundle "$TESTDIR/bundles/rebase.hg"
adding changesets
adding manifests
adding file changes

View File

@ -13,7 +13,7 @@
$ hg init a
$ cd a
$ hg unbundle $TESTDIR/bundles/rebase.hg
$ hg unbundle "$TESTDIR/bundles/rebase.hg"
adding changesets
adding manifests
adding file changes
@ -317,7 +317,7 @@ All destination are B
$ hg init ah
$ cd ah
$ hg unbundle $TESTDIR/bundles/rebase-revset.hg
$ hg unbundle "$TESTDIR/bundles/rebase-revset.hg"
adding changesets
adding manifests
adding file changes

View File

@ -25,15 +25,15 @@ create source repository
$ hg ci -Am addfile
adding a
adding b
$ cat $TESTDIR/binfile.bin >> a
$ cat $TESTDIR/binfile.bin >> b
$ cat "$TESTDIR/binfile.bin" >> a
$ cat "$TESTDIR/binfile.bin" >> b
$ hg ci -Am changefiles
make another commit to create files larger than 1 KB to test
formatting of final byte count
$ cat $TESTDIR/binfile.bin >> a
$ cat $TESTDIR/binfile.bin >> b
$ cat "$TESTDIR/binfile.bin" >> a
$ cat "$TESTDIR/binfile.bin" >> b
$ hg ci -m anotherchange
don't sit forever trying to double-lock the source repo

View File

@ -4,7 +4,7 @@ creating 'remote' repo
$ hg init remote
$ cd remote
$ hg unbundle $TESTDIR/bundles/remote.hg
$ hg unbundle "$TESTDIR/bundles/remote.hg"
adding changesets
adding manifests
adding file changes
@ -17,7 +17,7 @@ creating 'remote' repo
clone remote via stream
$ for i in 0 1 2 3 4 5 6 7 8; do
> hg clone -e "python $TESTDIR/dummyssh" --uncompressed -r "$i" ssh://user@dummy/remote test-"$i"
> hg clone -e 'python "$TESTDIR/dummyssh"' --uncompressed -r "$i" ssh://user@dummy/remote test-"$i"
> if cd test-"$i"; then
> hg verify
> cd ..
@ -139,7 +139,7 @@ clone remote via stream
4 files, 9 changesets, 7 total revisions
$ cd ..
$ cd test-1
$ hg pull -e "python $TESTDIR/dummyssh" -r 4 ssh://user@dummy/remote
$ hg pull -e 'python "$TESTDIR/dummyssh"' -r 4 ssh://user@dummy/remote
pulling from ssh://user@dummy/remote
searching for changes
adding changesets
@ -153,7 +153,7 @@ clone remote via stream
crosschecking files in changesets and manifests
checking files
1 files, 3 changesets, 2 total revisions
$ hg pull -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote
$ hg pull -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote
pulling from ssh://user@dummy/remote
searching for changes
adding changesets
@ -163,7 +163,7 @@ clone remote via stream
(run 'hg update' to get a working copy)
$ cd ..
$ cd test-2
$ hg pull -e "python $TESTDIR/dummyssh" -r 5 ssh://user@dummy/remote
$ hg pull -e 'python "$TESTDIR/dummyssh"' -r 5 ssh://user@dummy/remote
pulling from ssh://user@dummy/remote
searching for changes
adding changesets
@ -177,7 +177,7 @@ clone remote via stream
crosschecking files in changesets and manifests
checking files
1 files, 5 changesets, 3 total revisions
$ hg pull -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote
$ hg pull -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote
pulling from ssh://user@dummy/remote
searching for changes
adding changesets

View File

@ -20,21 +20,21 @@ creating 'remote' repo
repo not found error
$ hg clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/nonexistent local
$ hg clone -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/nonexistent local
remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!
[255]
non-existent absolute path
$ hg clone -e "python $TESTDIR/dummyssh" ssh://user@dummy//`pwd`/nonexistent local
$ hg clone -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy//`pwd`/nonexistent local
remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!
[255]
clone remote via stream
$ hg clone -e "python $TESTDIR/dummyssh" --uncompressed ssh://user@dummy/remote local-stream
$ hg clone -e 'python "$TESTDIR/dummyssh"' --uncompressed ssh://user@dummy/remote local-stream
streaming all changes
4 files to transfer, 392 bytes of data
transferred 392 bytes in * seconds (*/sec) (glob)
@ -51,7 +51,7 @@ clone remote via stream
clone remote via pull
$ hg clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote local
$ hg clone -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote local
requesting all changes
adding changesets
adding manifests
@ -76,7 +76,7 @@ empty default pull
$ hg paths
default = ssh://user@dummy/remote
$ hg pull -e "python $TESTDIR/dummyssh"
$ hg pull -e 'python "$TESTDIR/dummyssh"'
pulling from ssh://user@dummy/remote
searching for changes
no changes found
@ -90,7 +90,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
@ -106,7 +106,7 @@ find outgoing
find incoming on the remote side
$ hg incoming -R ../remote -e "python $TESTDIR/dummyssh" ssh://user@dummy/local
$ hg incoming -R ../remote -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/local
comparing with ssh://user@dummy/local
searching for changes
changeset: 1:a28a9d1a809c
@ -118,7 +118,7 @@ find incoming on the remote side
find incoming on the remote side (using absolute path)
$ hg incoming -R ../remote -e "python $TESTDIR/dummyssh" "ssh://user@dummy/`pwd`"
$ hg incoming -R ../remote -e 'python "$TESTDIR/dummyssh"' "ssh://user@dummy/`pwd`"
comparing with ssh://user@dummy/$TESTTMP/local
searching for changes
changeset: 1:a28a9d1a809c
@ -163,7 +163,7 @@ check remote tip
test pushkeys and bookmarks
$ cd ../local
$ hg debugpushkey --config ui.ssh="python $TESTDIR/dummyssh" ssh://user@dummy/remote namespaces
$ hg debugpushkey --config ui.ssh='python "$TESTDIR/dummyssh"' ssh://user@dummy/remote namespaces
bookmarks
phases
namespaces
@ -178,7 +178,7 @@ test pushkeys and bookmarks
no changes found
exporting bookmark foo
[1]
$ hg debugpushkey --config ui.ssh="python $TESTDIR/dummyssh" ssh://user@dummy/remote bookmarks
$ hg debugpushkey --config ui.ssh='python "$TESTDIR/dummyssh"' ssh://user@dummy/remote bookmarks
foo 1160648e36cec0054048a7edc4110c6f84fde594
$ hg book -f foo
$ hg push --traceback
@ -249,7 +249,7 @@ clone bookmarks
$ hg -R ../remote bookmark test
$ hg -R ../remote bookmarks
* test 2:6c0482d977a3
$ hg clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote local-bookmarks
$ hg clone -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote local-bookmarks
requesting all changes
adding changesets
adding manifests
@ -273,9 +273,9 @@ results here)
Test remote paths with spaces (issue2983):
$ hg init --ssh "python $TESTDIR/dummyssh" "ssh://user@dummy/a repo"
$ hg init --ssh 'python "$TESTDIR/dummyssh"' "ssh://user@dummy/a repo"
$ hg -R 'a repo' tag tag
$ hg id --ssh "python $TESTDIR/dummyssh" "ssh://user@dummy/a repo"
$ hg id --ssh 'python "$TESTDIR/dummyssh"' "ssh://user@dummy/a repo"
3fb238f49e8c
Test hg-ssh:

View File

@ -169,9 +169,9 @@ hg status -A:
hg status -A (with terminfo color):
$ mkdir $TESTTMP/terminfo
$ TERMINFO=$TESTTMP/terminfo tic $TESTDIR/hgterm.ti
$ TERM=hgterm TERMINFO=$TESTTMP/terminfo hg status --config color.mode=terminfo --color=always -A
$ mkdir "$TESTTMP/terminfo"
$ TERMINFO="$TESTTMP/terminfo" tic "$TESTDIR/hgterm.ti"
$ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo --color=always -A
\x1b[30m\x1b[32m\x1b[1mA added\x1b[30m (esc)
\x1b[30m\x1b[32m\x1b[1mA copied\x1b[30m (esc)
\x1b[30m\x1b[30m modified\x1b[30m (esc)

View File

@ -262,7 +262,7 @@ Enable progress extension for archive tests:
Test archiving to a directory tree (the doubled lines in the output
only show up in the test output, not in real usage):
$ hg archive --subrepos ../archive 2>&1 | $TESTDIR/filtercr.py
$ hg archive --subrepos ../archive 2>&1 | "$TESTDIR/filtercr.py"
archiving [ ] 0/3
archiving [ ] 0/3
@ -302,7 +302,7 @@ only show up in the test output, not in real usage):
Test archiving to zip file (unzip output is unstable):
$ hg archive --subrepos ../archive.zip 2>&1 | $TESTDIR/filtercr.py
$ hg archive --subrepos ../archive.zip 2>&1 | "$TESTDIR/filtercr.py"
archiving [ ] 0/3
archiving [ ] 0/3
@ -333,7 +333,7 @@ cloned:
$ hg clone -U . ../empty
$ cd ../empty
$ hg archive --subrepos -r tip ../archive.tar.gz 2>&1 | $TESTDIR/filtercr.py
$ hg archive --subrepos -r tip ../archive.tar.gz 2>&1 | "$TESTDIR/filtercr.py"
archiving [ ] 0/3
archiving [ ] 0/3

View File

@ -72,7 +72,7 @@ subrepo debug for 'main' clone
subrepo paths with ssh urls
$ cp $TESTDIR/dummyssh $BINDIR/ssh
$ cp "$TESTDIR/dummyssh" "$BINDIR/ssh"
$ hg clone ssh://user@dummy/cloned sshclone
requesting all changes
@ -103,4 +103,4 @@ subrepo paths with ssh urls
Got arguments 1:user@dummy 2:hg -R sub serve --stdio
Got arguments 1:user@dummy 2:hg -R $TESTTMP/cloned serve --stdio
Got arguments 1:user@dummy 2:hg -R $TESTTMP/sub serve --stdio
$ rm $BINDIR/ssh
$ rm "$BINDIR/ssh"

View File

@ -195,13 +195,13 @@ now addremove should remove old files
$ hg manifest --debug
2564acbe54bbbedfbf608479340b359f04597f80 644 @ dangling
$ $TESTDIR/readlink.py dangling
$ "$TESTDIR/readlink.py" dangling
dangling -> nothing
$ rm dangling
$ ln -s void dangling
$ hg commit -m 'change symlink'
$ $TESTDIR/readlink.py dangling
$ "$TESTDIR/readlink.py" dangling
dangling -> void
@ -209,7 +209,7 @@ modifying link
$ rm dangling
$ ln -s empty dangling
$ $TESTDIR/readlink.py dangling
$ "$TESTDIR/readlink.py" dangling
dangling -> empty
@ -217,13 +217,13 @@ reverting to rev 0:
$ hg revert -r 0 -a
reverting dangling
$ $TESTDIR/readlink.py dangling
$ "$TESTDIR/readlink.py" dangling
dangling -> nothing
backups:
$ $TESTDIR/readlink.py *.orig
$ "$TESTDIR/readlink.py" *.orig
dangling.orig -> empty
$ rm *.orig
$ hg up -C
@ -236,7 +236,7 @@ copies
$ hg st -Cmard
A dangling2
dangling
$ $TESTDIR/readlink.py dangling dangling2
$ "$TESTDIR/readlink.py" dangling dangling2
dangling -> void
dangling2 -> void