changeset 16372:709924be3d04 stable

merge with crew
author Matt Mackall <mpm@selenic.com>
date Fri, 06 Apr 2012 15:17:50 -0500
parents e14d7805845d (current diff) 8ca7187d479f (diff)
children 329887a7074c f3df7d34791e
files tests/test-debugbuilddag.t
diffstat 41 files changed, 134 insertions(+), 118 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/inotify/linuxserver.py	Wed Apr 04 15:59:56 2012 +0200
+++ b/hgext/inotify/linuxserver.py	Fri Apr 06 15:17:50 2012 -0500
@@ -7,7 +7,7 @@
 # GNU General Public License version 2 or any later version.
 
 from mercurial.i18n import _
-from mercurial import osutil, util
+from mercurial import osutil, util, error
 import server
 import errno, os, select, stat, sys, time
 
@@ -431,7 +431,10 @@
 
     def shutdown(self):
         for obj in pollable.instances.itervalues():
-            obj.shutdown()
+            try:
+                obj.shutdown()
+            except error.SignalInterrupt:
+                pass
 
     def run(self):
         self.repowatcher.setup()
--- a/mercurial/commands.py	Wed Apr 04 15:59:56 2012 +0200
+++ b/mercurial/commands.py	Fri Apr 06 15:17:50 2012 -0500
@@ -2413,9 +2413,9 @@
     Returns 0 on success.
     """
     changesets += tuple(opts.get('rev', []))
-    if not changesets:
+    revs = scmutil.revrange(repo, changesets)
+    if not revs:
         raise util.Abort(_("export requires at least one changeset"))
-    revs = scmutil.revrange(repo, changesets)
     if len(revs) > 1:
         ui.note(_('exporting patches:\n'))
     else:
--- a/mercurial/hg.py	Wed Apr 04 15:59:56 2012 +0200
+++ b/mercurial/hg.py	Fri Apr 06 15:17:50 2012 -0500
@@ -404,6 +404,8 @@
         release(srclock, destlock)
         if dircleanup is not None:
             dircleanup.cleanup()
+        if srcrepo is not None:
+            srcrepo.close()
 
 def _showstats(repo, stats):
     repo.ui.status(_("%d files updated, %d files merged, "
--- a/tests/test-archive-symlinks.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-archive-symlinks.t	Fri Apr 06 15:17:50 2012 -0500
@@ -18,7 +18,7 @@
 
   $ cd "$origdir"
   $ cd archive
-  $ $TESTDIR/readlink.py dangling
+  $ "$TESTDIR/readlink.py" dangling
   dangling -> nothing
 
 tar
@@ -26,7 +26,7 @@
   $ cd "$origdir"
   $ tar xf archive.tar
   $ cd tar
-  $ $TESTDIR/readlink.py dangling
+  $ "$TESTDIR/readlink.py" dangling
   dangling -> nothing
 
 zip
@@ -34,5 +34,5 @@
   $ cd "$origdir"
   $ unzip archive.zip > /dev/null
   $ cd zip
-  $ $TESTDIR/readlink.py dangling
+  $ "$TESTDIR/readlink.py" dangling
   dangling -> nothing
--- a/tests/test-archive.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-archive.t	Fri Apr 06 15:17:50 2012 -0500
@@ -221,7 +221,7 @@
   > 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
--- a/tests/test-audit-path.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-audit-path.t	Fri Apr 06 15:17:50 2012 -0500
@@ -35,7 +35,7 @@
 
   $ hg init target
   $ cd target
-  $ hg unbundle $TESTDIR/bundles/tampered.hg
+  $ hg unbundle "$TESTDIR/bundles/tampered.hg"
   adding changesets
   adding manifests
   adding file changes
--- a/tests/test-bundle-r.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-bundle-r.t	Fri Apr 06 15:17:50 2012 -0500
@@ -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
--- a/tests/test-check-pyflakes.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-check-pyflakes.t	Fri Apr 06 15:17:50 2012 -0500
@@ -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)
   
 
--- a/tests/test-contrib.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-contrib.t	Fri Apr 06 15:17:50 2012 -0500
@@ -1,6 +1,6 @@
 Set vars:
 
-  $ CONTRIBDIR=$TESTDIR/../contrib
+  $ CONTRIBDIR="$TESTDIR/../contrib"
 
 Prepare repo-a:
 
@@ -26,7 +26,7 @@
 
 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 @@
 
 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 @@
 
 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
--- a/tests/test-convert-cvsnt-mergepoints.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-convert-cvsnt-mergepoints.t	Fri Apr 06 15:17:50 2012 -0500
@@ -101,7 +101,7 @@
   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
--- a/tests/test-convert-svn-move.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-convert-svn-move.t	Fri Apr 06 15:17:50 2012 -0500
@@ -173,7 +173,7 @@
   > 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
--- a/tests/test-copy.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-copy.t	Fri Apr 06 15:17:50 2012 -0500
@@ -78,13 +78,13 @@
   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
--- a/tests/test-debugbuilddag.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-debugbuilddag.t	Fri Apr 06 15:17:50 2012 -0500
@@ -9,7 +9,7 @@
   > --config progress.delay=0 --config progress.refresh=0 \
   > --config progress.format=topic,bar,number \
   > --config progress.width=60 2>&1 | \
-  > python $TESTDIR/filtercr.py
+  > python "$TESTDIR/filtercr.py"
   
   building [                                          ]  0/12
   building [                                          ]  0/12
--- a/tests/test-diff-binary-file.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-diff-binary-file.t	Fri Apr 06 15:17:50 2012 -0500
@@ -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'
 
--- a/tests/test-encoding.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-encoding.t	Fri Apr 06 15:17:50 2012 -0500
@@ -5,7 +5,7 @@
 
 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
--- a/tests/test-export.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-export.t	Fri Apr 06 15:17:50 2012 -0500
@@ -129,3 +129,17 @@
   exporting patch:
   ____________0123456789_______ABCDEFGHIJKLMNOPQRSTUVWXYZ______abcdefghijklmnopqrstuvwxyz____.patch
 
+Catch exporting unknown revisions (especially empty revsets, see issue3353)
+
+  $ hg export
+  abort: export requires at least one changeset
+  [255]
+  $ hg export ""
+  hg: parse error: empty query
+  [255]
+  $ hg export 999
+  abort: unknown revision '999'!
+  [255]
+  $ hg export "not all()"
+  abort: export requires at least one changeset
+  [255]
--- a/tests/test-gendoc.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-gendoc.t	Fri Apr 06 15:17:50 2012 -0500
@@ -3,18 +3,18 @@
   $ "$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
--- a/tests/test-git-export.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-git-export.t	Fri Apr 06 15:17:50 2012 -0500
@@ -96,7 +96,7 @@
 
 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 @@
   $ 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:
 
--- a/tests/test-gpg.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-gpg.t	Fri Apr 06 15:17:50 2012 -0500
@@ -1,16 +1,12 @@
 Test the GPG extension
 
   $ "$TESTDIR/hghave" gpg || exit 80
-  $ if ! hg identify -q > /dev/null; then
-  >     echo "skipped: not a Mercurial working dir" >&2
-  >     exit 80
-  > fi
   $ cat <<EOF >> $HGRCPATH
   > [extensions]
   > 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
@@ -32,4 +28,5 @@
 
 verify that this test has not modified the trustdb.gpg file back in
 the main hg working dir
-  $ hg --cwd $TESTDIR status gpg
+  $ "$TESTDIR/md5sum.py" "$TESTDIR/gpg/trustdb.gpg"
+  f6b9c78c65fa9536e7512bb2ceb338ae  */gpg/trustdb.gpg (glob)
--- a/tests/test-grep.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-grep.t	Fri Apr 06 15:17:50 2012 -0500
@@ -165,7 +165,7 @@
 
   $ 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
--- a/tests/test-http-clone-r.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-http-clone-r.t	Fri Apr 06 15:17:50 2012 -0500
@@ -4,7 +4,7 @@
 
   $ hg init remote
   $ cd remote
-  $ hg unbundle $TESTDIR/bundles/remote.hg
+  $ hg unbundle "$TESTDIR/bundles/remote.hg"
   adding changesets
   adding manifests
   adding file changes
--- a/tests/test-init.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-init.t	Fri Apr 06 15:17:50 2012 -0500
@@ -61,7 +61,7 @@
 
 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 @@
   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 @@
 
 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 @@
 
 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 @@
   $ 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
--- a/tests/test-keyword.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-keyword.t	Fri Apr 06 15:17:50 2012 -0500
@@ -907,14 +907,14 @@
 
   $ 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 @@
   
   
   
-  $ $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 @@
   +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
   
   
--- a/tests/test-largefiles.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-largefiles.t	Fri Apr 06 15:17:50 2012 -0500
@@ -843,7 +843,7 @@
   $ "$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.
--- a/tests/test-merge-types.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-merge-types.t	Fri Apr 06 15:17:50 2012 -0500
@@ -89,7 +89,7 @@
    a: versions differ -> m
   preserving a for resolve of a
   updating: a 1/1 files (100.00%)
-  couldn't find merge tool hgmerge
+  (couldn't find merge tool hgmerge|tool hgmerge can't handle symlinks) (re)
   picked tool 'internal:prompt' for a (binary False symlink True)
    no tool found to merge a
   keep (l)ocal or take (o)ther? l
--- a/tests/test-mq-symlinks.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-mq-symlinks.t	Fri Apr 06 15:17:50 2012 -0500
@@ -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 @@
   $ 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 @@
   $ hg qpush
   applying symlink.patch
   now at: symlink.patch
-  $ $TESTDIR/readlink.py a
+  $ "$TESTDIR/readlink.py" a
   a -> b
 
 
@@ -39,7 +39,7 @@
   $ 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 @@
   patching file a
   a
   now at: updatelink
-  $ $TESTDIR/readlink.py a
+  $ "$TESTDIR/readlink.py" a
   a -> c
   $ hg st
 
@@ -104,5 +104,5 @@
   $ hg qpush
   applying movelink
   now at: movelink
-  $ $TESTDIR/readlink.py linkb
+  $ "$TESTDIR/readlink.py" linkb
   linkb -> linkb
--- a/tests/test-patchbomb.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-patchbomb.t	Fri Apr 06 15:17:50 2012 -0500
@@ -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.
   
   
--- a/tests/test-progress.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-progress.t	Fri Apr 06 15:17:50 2012 -0500
@@ -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 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 @@
 
 
   $ 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 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 @@
                                                               \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 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 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 @@
 
 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 @@
 
 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 @@
   $ 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 @@
   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 @@
   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 @@
                                                               \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 @@
                                                               \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
--- a/tests/test-push-r.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-push-r.t	Fri Apr 06 15:17:50 2012 -0500
@@ -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
--- a/tests/test-rebase-collapse.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-rebase-collapse.t	Fri Apr 06 15:17:50 2012 -0500
@@ -15,7 +15,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
--- a/tests/test-rebase-detach.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-rebase-detach.t	Fri Apr 06 15:17:50 2012 -0500
@@ -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
--- a/tests/test-rebase-named-branches.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-rebase-named-branches.t	Fri Apr 06 15:17:50 2012 -0500
@@ -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
--- a/tests/test-rebase-parameters.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-rebase-parameters.t	Fri Apr 06 15:17:50 2012 -0500
@@ -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
--- a/tests/test-rebase-scenario-global.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-rebase-scenario-global.t	Fri Apr 06 15:17:50 2012 -0500
@@ -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 @@
 
   $ 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
--- a/tests/test-relink.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-relink.t	Fri Apr 06 15:17:50 2012 -0500
@@ -25,15 +25,15 @@
   $ 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
--- a/tests/test-ssh-clone-r.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-ssh-clone-r.t	Fri Apr 06 15:17:50 2012 -0500
@@ -4,7 +4,7 @@
 
   $ 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 @@
 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 @@
   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 @@
   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 @@
   (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 @@
   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
--- a/tests/test-ssh.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-ssh.t	Fri Apr 06 15:17:50 2012 -0500
@@ -20,21 +20,21 @@
 
 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 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 @@
 
   $ 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 @@
 
   $ 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 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 (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 @@
 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 @@
   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 @@
   $ 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 @@
 
 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:
--- a/tests/test-status-color.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-status-color.t	Fri Apr 06 15:17:50 2012 -0500
@@ -169,9 +169,9 @@
 
 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)
--- a/tests/test-subrepo-recursion.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-subrepo-recursion.t	Fri Apr 06 15:17:50 2012 -0500
@@ -262,7 +262,7 @@
 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 @@
 
 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 @@
 
   $ 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
--- a/tests/test-subrepo-relative-path.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-subrepo-relative-path.t	Fri Apr 06 15:17:50 2012 -0500
@@ -72,7 +72,7 @@
 
 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 @@
   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"
--- a/tests/test-symlinks.t	Wed Apr 04 15:59:56 2012 +0200
+++ b/tests/test-symlinks.t	Fri Apr 06 15:17:50 2012 -0500
@@ -195,13 +195,13 @@
   
   $ 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 @@
 
   $ rm dangling
   $ ln -s empty dangling
-  $ $TESTDIR/readlink.py dangling
+  $ "$TESTDIR/readlink.py" dangling
   dangling -> empty
 
 
@@ -217,13 +217,13 @@
 
   $ 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 @@
   $ hg st -Cmard
   A dangling2
     dangling
-  $ $TESTDIR/readlink.py dangling dangling2
+  $ "$TESTDIR/readlink.py" dangling dangling2
   dangling -> void
   dangling2 -> void