changeset 10786:2f2ae64a2948

Merge with stable
author Matt Mackall <mpm@selenic.com>
date Mon, 29 Mar 2010 15:51:26 -0500
parents 071da7caac22 (current diff) 716e76f89e3a (diff)
children 5974123d0339
files tests/test-subrepo
diffstat 25 files changed, 178 insertions(+), 90 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/schemes.py	Mon Mar 29 15:16:38 2010 -0500
+++ b/hgext/schemes.py	Mon Mar 29 15:51:26 2010 -0500
@@ -34,6 +34,7 @@
   bb = https://bitbucket.org/
   bb+ssh = ssh://hg@bitbucket.org/
   gcode = https://{1}.googlecode.com/hg/
+  kiln = https://{1}.kilnhg.com/Repo/
 
 You can override a predefined scheme by defining a new scheme with the
 same name.
@@ -72,7 +73,8 @@
     'py': 'http://hg.python.org/',
     'bb': 'https://bitbucket.org/',
     'bb+ssh': 'ssh://hg@bitbucket.org/',
-    'gcode': 'https://{1}.googlecode.com/hg/'
+    'gcode': 'https://{1}.googlecode.com/hg/',
+    'kiln': 'https://{1}.kilnhg.com/Repo/'
     }
 
 def extsetup(ui):
--- a/i18n/sv.po	Mon Mar 29 15:16:38 2010 -0500
+++ b/i18n/sv.po	Mon Mar 29 15:51:26 2010 -0500
@@ -13,8 +13,8 @@
 msgstr ""
 "Project-Id-Version: Mercurial\n"
 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
-"POT-Creation-Date: 2010-03-22 19:23+0100\n"
-"PO-Revision-Date: 2010-03-23 21:58+0100\n"
+"POT-Creation-Date: 2010-03-28 19:48+0200\n"
+"PO-Revision-Date: 2010-03-28 20:26+0100\n"
 "Last-Translator: Jens Bäckman <jens.backman@gmail.com>\n"
 "Language-Team: Swedish\n"
 "MIME-Version: 1.0\n"
@@ -2602,11 +2602,11 @@
 msgid ""
 "commit changes in the queue repository (DEPRECATED)\n"
 "\n"
-"    This command is deprecated; use hg --mq commit instead."
+"    This command is deprecated; use hg commit --mq instead."
 msgstr ""
 "arkivera ändringar i köarkivet (FÖRÅLDRAD)\n"
 "\n"
-"    Detta är ett föråldrat kommando; använd hg --mq commit istället."
+"    Detta är ett föråldrat kommando; använd hg commit --mq istället."
 
 msgid "print the entire series file"
 msgstr ""
@@ -8461,6 +8461,46 @@
 "\n"
 "  re:.*\\.c$      any name ending in \".c\", anywhere in the repository\n"
 msgstr ""
+"Mercurial acceptera flera notationer för att identifiera en eller flera\n"
+"filer samma gång.\n"
+"\n"
+"Som standard behandlar Mercurial filnamn som ett utökat glob-mönster i\n"
+"skalstil.\n"
+"\n"
+"Alternativa mönsternotationer måste anges explicit.\n"
+"\n"
+"För att använda en enkel sökväg utan någon mönstermatching, börja den med\n"
+"``path:``. Dessa sökvägar måste överrensstämma helt från det nuvarande\n"
+"arkivroten.\n"
+"\n"
+"För att använda utökad glob, börja ett namn med ``glob:``. Globs har sin\n"
+"rot i den aktuella katalogen; en glob som ``*.c`` kommer bara att matcha\n"
+"filer i den aktuella katalogen som slutar med ``.c``.\n"
+"\n"
+"Den utökade glob-syntaxen är ``**`` för att matcha alla strängar i sökvägen\n"
+"och ``{a,b}`` som innebär \"a eller b\".\n"
+"\n"
+"För att använda reguljära uttryck från Perl/Python, börja ett namn med\n"
+"``re:``. Regexp-mönstermatchning har sin början i arkivroten.\n"
+"\n"
+"Råa exempel::\n"
+"\n"
+"  path:foo/bar   namnet bar i en katalog med namnet foo i arkivroten\n"
+"  path:path:name en fil eller katalog med namnet \"path:name\"\n"
+"\n"
+"Glob-exempel::\n"
+"\n"
+"  glob:*.c       alla namn som slutar på \".c\" i den nuvarande katalogen\n"
+"  *.c            alla namn som slutar på \".c\" i den nuvarande katalogen\n"
+"  **.c           alla namn som slutar på \".c\" i alla underkataloger från\n"
+"                 den nuvarande katalogen inklusive sig själv.\n"
+"  foo/*.c        alla namn som slutar på \".c\" i katalogen foo\n"
+"  foo/**.c       alla namn som slutar på \".c\" i alla underkataloger från\n"
+"                 foo inklusive sig själv.\n"
+"\n"
+"Regexp-exempel::\n"
+"\n"
+"  re:.*\\.c$      alla namn som slutar med \".c\", var som helst i arkivet\n"
 
 msgid ""
 "Mercurial supports several ways to specify individual revisions.\n"
@@ -8591,8 +8631,9 @@
 "The \"date\" keyword does not produce human-readable output. If you\n"
 "want to use a date in your output, you can use a filter to process\n"
 "it. Filters are functions which return a string based on the input\n"
-"variable. You can also use a chain of filters to get the desired\n"
-"output::\n"
+"variable. Be sure to use the stringify filter first when you're\n"
+"applying a string-input filter to a list-like input variable.\n"
+"You can also use a chain of filters to get the desired output::\n"
 "\n"
 "   $ hg tip --template \"{date|isodate}\\n\"\n"
 "   2008-08-21 18:22 +0000\n"
@@ -9668,10 +9709,10 @@
 
 #, python-format
 msgid "user: %s\n"
-msgstr "användare: %s\n""
+msgstr "användare: %s\n"
 
 msgid "user:"
-msgstr "användare:""
+msgstr "användare:"
 
 #, python-format
 msgid "http auth: user %s, password %s\n"
--- a/mercurial/templates/map-cmdline.default	Mon Mar 29 15:16:38 2010 -0500
+++ b/mercurial/templates/map-cmdline.default	Mon Mar 29 15:51:26 2010 -0500
@@ -14,9 +14,9 @@
 start_file_dels = 'files-:     '
 file_del = ' {file_del}'
 end_file_dels = '\n'
-start_file_copies_switch = 'copies:     '
+start_file_copies = 'copies:     '
 file_copy = ' {name} ({source})'
-end_file_copies_switch = '\n'
+end_file_copies = '\n'
 parent = 'parent:      {rev}:{node|formatnode}\n'
 manifest = 'manifest:    {rev}:{node}\n'
 branch = 'branch:      {branch}\n'
--- a/tests/test-bisect	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-bisect	Mon Mar 29 15:51:26 2010 -0500
@@ -103,5 +103,5 @@
 hg bisect -r
 hg bisect --good tip
 hg bisect --bad 0
-hg bisect --command "`pwd`/script.py"
+hg bisect --command "'`pwd`/script.py' and some parameters"
 true
--- a/tests/test-convert	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-convert	Mon Mar 29 15:51:26 2010 -0500
@@ -49,7 +49,7 @@
 mkdir emptydir
 # override $PATH to ensure p4 not visible; use $PYTHON in case we're
 # running from a devel copy, not a temp installation
-PATH=$BINDIR $PYTHON $BINDIR/hg convert emptydir 2>&1 | sed 's,file://.*/emptydir,.../emptydir,g'
+PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir 2>&1 | sed 's,file://.*/emptydir,.../emptydir,g'
 
 echo % convert with imaginary source type
 hg convert --source-type foo a a-foo
--- a/tests/test-convert-hg-svn	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-convert-hg-svn	Mon Mar 29 15:51:26 2010 -0500
@@ -12,9 +12,9 @@
 echo "mq = " >> $HGRCPATH
 
 svnpath=`pwd | fix_path`/svn-repo
-svnadmin create $svnpath
+svnadmin create "$svnpath"
 
-cat > $svnpath/hooks/pre-revprop-change <<'EOF'
+cat > "$svnpath"/hooks/pre-revprop-change <<'EOF'
 #!/bin/sh
 
 REPOS="$1"
@@ -30,19 +30,19 @@
 echo "Changing prohibited revision property" >&2
 exit 1
 EOF
-chmod +x $svnpath/hooks/pre-revprop-change
+chmod +x "$svnpath"/hooks/pre-revprop-change
 
 # SVN wants all paths to start with a slash. Unfortunately,
 # Windows ones don't. Handle that.
-svnurl=$svnpath
-expr $svnurl : "\/" > /dev/null
+svnurl="$svnpath"
+expr "$svnurl" : "\/" > /dev/null
 if [ $? -ne 0 ]; then
-    svnurl='/'$svnurl
+    svnurl="/$svnurl"
 fi
-svnurl=file://$svnurl
-svn co $svnurl $svnpath-wc
+svnurl="file://$svnurl"
+svn co "$svnurl" "$svnpath"-wc
 
-cd $svnpath-wc
+cd "$svnpath"-wc
 echo a > a
 svn add a
 svn ci -m'added a' a
@@ -50,17 +50,17 @@
 cd ..
 
 echo % initial roundtrip
-hg convert -s svn -d hg $svnpath-wc $svnpath-hg | grep -v initializing
-hg convert -s hg -d svn $svnpath-hg $svnpath-wc
+hg convert -s svn -d hg "$svnpath"-wc "$svnpath"-hg | grep -v initializing
+hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
 
 echo % second roundtrip should do nothing
-hg convert -s svn -d hg $svnpath-wc $svnpath-hg
-hg convert -s hg -d svn $svnpath-hg $svnpath-wc
+hg convert -s svn -d hg "$svnpath"-wc "$svnpath"-hg
+hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
 
 echo % new hg rev
 
-hg clone $svnpath-hg $svnpath-work
-cd $svnpath-work
+hg clone "$svnpath"-hg "$svnpath"-work
+cd "$svnpath"-work
 echo b > b
 hg add b
 hg ci -mb
@@ -70,10 +70,10 @@
 cd ..
 
 echo % echo hg to svn
-hg --cwd $svnpath-hg pull -q $svnpath-work
-hg convert -s hg -d svn $svnpath-hg $svnpath-wc
+hg --cwd "$svnpath"-hg pull -q "$svnpath"-work
+hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
 
 echo % svn back to hg should do nothing
-hg convert -s svn -d hg $svnpath-wc $svnpath-hg
+hg convert -s svn -d hg "$svnpath"-wc "$svnpath"-hg
 echo % hg back to svn should do nothing
-hg convert -s hg -d svn $svnpath-hg $svnpath-wc
+hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
--- a/tests/test-convert-svn-move	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-convert-svn-move	Mon Mar 29 15:51:26 2010 -0500
@@ -17,14 +17,14 @@
 svnpath=`pwd | fix_path`
 # SVN wants all paths to start with a slash. Unfortunately,
 # Windows ones don't. Handle that.
-expr $svnpath : "\/" > /dev/null
+expr "$svnpath" : "\/" > /dev/null
 if [ $? -ne 0 ]; then
-    svnpath='/'$svnpath
+    svnpath="/$svnpath"
 fi
-svnurl=file://$svnpath/svn-repo
+svnurl="file://$svnpath/svn-repo"
 
 echo % convert trunk and branches
-hg convert --datesort $svnurl/subproject A-hg
+hg convert --datesort "$svnurl"/subproject A-hg
 
 cd A-hg
 hg glog --template '{rev} {desc|firstline} files: {files}\n'
--- a/tests/test-convert-svn-source	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-convert-svn-source	Mon Mar 29 15:51:26 2010 -0500
@@ -16,9 +16,9 @@
 svnpath=`pwd | fix_path`
 # SVN wants all paths to start with a slash. Unfortunately,
 # Windows ones don't. Handle that.
-expr $svnpath : "\/" > /dev/null
+expr "$svnpath" : "\/" > /dev/null
 if [ $? -ne 0 ]; then
-    svnpath='/'$svnpath
+    svnpath="/$svnpath"
 fi
 
 echo "# now tests that it works with trunk/tags layout, but no branches yet"
@@ -30,12 +30,12 @@
 mkdir tags
 cd ..
 
-svnurl=file://$svnpath/svn-repo/proj%20B
-svn import -m "init projB" projB $svnurl | fix_path
+svnurl="file://$svnpath/svn-repo/proj%20B"
+svn import -m "init projB" projB "$svnurl" | fix_path
 
 
 echo % update svn repository
-svn co $svnurl/trunk B | fix_path
+svn co "$svnurl"/trunk B | fix_path
 cd B
 echo hello > 'letter .txt'
 svn add 'letter .txt'
@@ -44,14 +44,14 @@
 "$TESTDIR/svn-safe-append.py" world 'letter .txt'
 svn ci -m world
 
-svn copy -m "tag v0.1" $svnurl/trunk $svnurl/tags/v0.1
+svn copy -m "tag v0.1" "$svnurl"/trunk "$svnurl"/tags/v0.1
 
 "$TESTDIR/svn-safe-append.py" 'nice day today!' 'letter .txt'
 svn ci -m "nice day"
 cd ..
 
 echo % convert to hg once
-hg convert $svnurl B-hg
+hg convert "$svnurl" B-hg
 
 echo % update svn repository again
 cd B
@@ -60,7 +60,7 @@
 svn add letter2.txt
 svn ci -m "second letter"
 
-svn copy -m "tag v0.2" $svnurl/trunk $svnurl/tags/v0.2
+svn copy -m "tag v0.2" "$svnurl"/trunk "$svnurl"/tags/v0.2
 
 "$TESTDIR/svn-safe-append.py" "blah-blah-blah" letter2.txt
 svn ci -m "work in progress"
@@ -69,7 +69,7 @@
 ########################################
 
 echo % test incremental conversion
-hg convert $svnurl B-hg
+hg convert "$svnurl" B-hg
 
 cd B-hg
 hg glog --template '{rev} {desc|firstline} files: {files}\n'
@@ -78,11 +78,11 @@
 
 echo % test filemap
 echo 'include letter2.txt' > filemap
-hg convert --filemap filemap $svnurl/trunk fmap
+hg convert --filemap filemap "$svnurl"/trunk fmap
 hg glog -R fmap --template '{rev} {desc|firstline} files: {files}\n'
 
 echo % test stop revision
-hg convert --rev 1 $svnurl/trunk stoprev
+hg convert --rev 1 "$svnurl"/trunk stoprev
 # Check convert_revision extra-records.
 # This is also the only place testing more than one extra field
 # in a revision.
--- a/tests/test-extdiff	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-extdiff	Mon Mar 29 15:51:26 2010 -0500
@@ -36,7 +36,7 @@
 # should diff cloned file against wc file
 hg falabala > out
 # cleanup the output since the wc is a tmp directory
-sed  's:\(.* \).*\(\/test-extdiff\):\1[tmp]\2:' out
+sed  's:\(diffing [^ ]* \).*\(\/test-extdiff\):\1[tmp]\2:' out
 # test --change option
 hg ci -d '2 0' -mtest3
 hg falabala -c 1
@@ -54,15 +54,15 @@
 hg diff --git
 echo '% edit with extdiff -p'
 # prepare custom diff/edit tool
-cat > differ.py << EOT
+cat > 'diff tool.py' << EOT
 #!/usr/bin/env python
 import time
 time.sleep(1) # avoid unchanged-timestamp problems
 file('a/a', 'ab').write('edited\n')
 file('a/b', 'ab').write('edited\n')
 EOT
-chmod +x differ.py
-hg extdiff -p `pwd`/differ.py # will change to /tmp/extdiff.TMP and populate directories a.TMP and a and start tool
+chmod +x 'diff tool.py'
+hg extdiff -p "`pwd`/diff tool.py" # will change to /tmp/extdiff.TMP and populate directories a.TMP and a and start tool
 echo '% diff in working directory, after'
 hg diff --git
 
--- a/tests/test-import	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-import	Mon Mar 29 15:51:26 2010 -0500
@@ -167,7 +167,7 @@
 dir=`pwd`
 cd b/d1/d2 2>&1 > /dev/null
 hg import  ../../../tip.patch
-cd $dir
+cd "$dir"
 echo "% message should be 'subdir change'"
 hg --cwd b tip | grep 'subdir change'
 echo "% committer should be 'someoneelse'"
--- a/tests/test-keyword	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-keyword	Mon Mar 29 15:51:26 2010 -0500
@@ -87,8 +87,8 @@
 diff a hooktest
 
 echo % removing commit hook from config
-sed -e '/\[hooks\]/,$ d' $HGRCPATH > $HGRCPATH.nohook
-mv $HGRCPATH.nohook $HGRCPATH
+sed -e '/\[hooks\]/,$ d' "$HGRCPATH" > $HGRCPATH.nohook
+mv "$HGRCPATH".nohook "$HGRCPATH"
 rm hooktest
 
 echo % bundle
@@ -115,8 +115,8 @@
 hg pull -u ../kw.hg 2>&1 | sed -e '/^Content-Type:/,/^diffs (/ d'
 
 echo % remove notify config
-sed -e '/\[hooks\]/,$ d' $HGRCPATH > $HGRCPATH.nonotify
-mv $HGRCPATH.nonotify $HGRCPATH
+sed -e '/\[hooks\]/,$ d' "$HGRCPATH" > $HGRCPATH.nonotify
+mv "$HGRCPATH".nonotify "$HGRCPATH"
 
 echo % touch
 touch a b
@@ -364,7 +364,7 @@
 echo % hg cat
 hg cat sym a b
 echo
-rm $HGRCPATH
+rm "$HGRCPATH"
 echo % cat
 cat a b
 echo % hg cat
--- a/tests/test-log	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-log	Mon Mar 29 15:51:26 2010 -0500
@@ -38,6 +38,10 @@
 echo '% log copies switch with --copies'
 hg log -vC --template '{rev} {file_copies_switch}\n'
 
+echo '% log copies with hardcoded style and with --style=default'
+hg log -vC -r4
+hg log -vC -r4 --style=default
+
 echo % log copies, non-linear manifest
 hg up -C 3
 hg mv dir/b e
--- a/tests/test-log.out	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-log.out	Mon Mar 29 15:51:26 2010 -0500
@@ -94,6 +94,27 @@
 2 dir/b (b)
 1 b (a)
 0 
+% log copies with hardcoded style and with --style=default
+changeset:   4:66c1345dc4f9
+tag:         tip
+user:        test
+date:        Thu Jan 01 00:00:05 1970 +0000
+files:       dir/b e
+copies:      e (dir/b)
+description:
+e
+
+
+changeset:   4:66c1345dc4f9
+tag:         tip
+user:        test
+date:        Thu Jan 01 00:00:05 1970 +0000
+files:       dir/b e
+copies:      e (dir/b)
+description:
+e
+
+
 % log copies, non-linear manifest
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 adding foo
--- a/tests/test-merge-tools	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-merge-tools	Mon Mar 29 15:51:26 2010 -0500
@@ -62,7 +62,7 @@
 echo "# hg merge -r 2"
 # override $PATH to ensure hgmerge not visible; use $PYTHON in case we're
 # running from a devel copy, not a temp installation
-PATH=$BINDIR $PYTHON $BINDIR/hg merge -r 2
+PATH="$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2
 aftermerge
 
 echo "# simplest hgrc using false for merge:"
@@ -177,6 +177,17 @@
 hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output'
 aftermerge
 
+echo '# Merge using tool with a path that must be quoted:'
+beforemerge
+cat <<EOF > 'my merge tool'
+#!/bin/sh
+cat "\$1" "\$2" "\$3" > "\$4"
+EOF
+chmod +x 'my merge tool'
+hg merge -r 2 --config merge-tools.true.executable='./my merge tool' --config merge-tools.true.args='$base $local $other $output'
+rm -f 'my merge tool'
+aftermerge
+
 
 echo
 echo Merge post-processing
--- a/tests/test-merge-tools.out	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-merge-tools.out	Mon Mar 29 15:51:26 2010 -0500
@@ -497,6 +497,25 @@
 # hg stat
 M f
 
+# Merge using tool with a path that must be quoted:
+[merge-tools]
+false.whatever=
+true.priority=1
+true.executable=cat
+# hg update -C 1
+merging f
+0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+(branch merge, don't forget to commit)
+# cat f
+revision 0
+space
+revision 1
+space
+revision 2
+space
+# hg stat
+M f
+
 
 Merge post-processing
 
--- a/tests/test-mq-merge	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-mq-merge	Mon Mar 29 15:51:26 2010 -0500
@@ -2,11 +2,6 @@
 
 # Test issue 529 - mq aborts when merging patch deleting files
 
-rewrite_path()
-{
-    sed -e 's:\\:/:g' -e 's:[^ ]*/t/::g'
-}
-
 checkundo()
 {
     if [ -f .hg/store/undo ]; then
@@ -33,7 +28,7 @@
 hg qrefresh -m "rm a"
 
 # Save the patch queue so we can merge it later
-hg qsave -c -e 2>&1 | rewrite_path
+hg qsave -c -e 2>&1 | grep -v ^copy
 checkundo qsave
 
 # Update b and commit in an "update" changeset
@@ -45,7 +40,7 @@
 # Here, qpush used to abort with :
 # The system cannot find the file specified => a
 hg manifest
-hg qpush -a -m 2>&1 | rewrite_path
+hg qpush -a -m 2>&1 | grep -v ^merging
 checkundo 'qpush -m'
 hg manifest
 
--- a/tests/test-mq-merge.out	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-mq-merge.out	Mon Mar 29 15:51:26 2010 -0500
@@ -1,12 +1,10 @@
 adding a
 adding b
-copy .hg/patches to .hg/patches.1
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 M b
 created new head
 a
 b
-merging with queue at: .hg/patches.1
 applying rm_a
 now at: rm_a
 b
--- a/tests/test-mq-qimport	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-mq-qimport	Mon Mar 29 15:51:26 2010 -0500
@@ -68,12 +68,12 @@
 rm foo
 # Under unix: file:///foobar/blah
 # Under windows: file:///c:/foobar/blah
-patchurl=`echo $HGTMP/url.diff | tr '\\\\' /`
-expr $patchurl : "\/" > /dev/null
+patchurl=`echo "$HGTMP"/url.diff | tr '\\\\' /`
+expr "$patchurl" : "\/" > /dev/null
 if [ $? -ne 0 ]; then
-    patchurl='/'$patchurl
+    patchurl="/$patchurl"
 fi
-hg qimport file://$patchurl
+hg qimport file://"$patchurl"
 hg qun
 
 echo % import patch that already exists
--- a/tests/test-progress	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-progress	Mon Mar 29 15:51:26 2010 -0500
@@ -30,7 +30,7 @@
 
 echo "[extensions]" >> $HGRCPATH
 echo "progress=" >> $HGRCPATH
-echo "loop=" `pwd`/loop.py >> $HGRCPATH
+echo "loop=`pwd`/loop.py" >> $HGRCPATH
 echo "[ui]" >> $HGRCPATH
 echo "interactive=1" >> $HGRCPATH
 
--- a/tests/test-pull	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-pull	Mon Mar 29 15:51:26 2010 -0500
@@ -32,4 +32,4 @@
 # It's tricky to make file:// URLs working on every platforms
 # with regular shell commands.
 URL=`python -c "import os; print 'file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"`
-hg pull -q $URL
+hg pull -q "$URL"
--- a/tests/test-rebase-pull	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-rebase-pull	Mon Mar 29 15:51:26 2010 -0500
@@ -4,8 +4,6 @@
 echo "graphlog=" >> $HGRCPATH
 echo "rebase=" >> $HGRCPATH
 
-BASE=`pwd`
-
 addcommit () {
     echo $1 > $1
     hg add $1
@@ -16,7 +14,6 @@
     hg commit -d "${2} 0" -m $1
 }
 
-cd $BASE
 rm -rf a
 hg init a
 cd a
--- a/tests/test-rollback	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-rollback	Mon Mar 29 15:51:26 2010 -0500
@@ -42,7 +42,7 @@
 #!/bin/sh
 echo "another precious commit message" > "$1"
 __EOF__
-chmod +x $HGTMP/editor
-HGEDITOR=$HGTMP/editor hg --config hooks.pretxncommit=false commit 2>&1 | sed 's,exited with status .*,exited ...,g'
+chmod +x "$HGTMP"/editor
+HGEDITOR="'$HGTMP'"/editor hg --config hooks.pretxncommit=false commit 2>&1 | sed 's,exited with status .*,exited ...,g'
 echo '.hg/last-message.txt:'
 cat .hg/last-message.txt
--- a/tests/test-subrepo	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-subrepo	Mon Mar 29 15:51:26 2010 -0500
@@ -197,8 +197,8 @@
 hg -R nested_relative add
 hg -R nested_relative ci -mtest2
 hg init main
-echo nested_relative = ../nested_relative > main/.hgsub
-echo nested_absolute = `pwd`/nested_absolute >> main/.hgsub
+echo "nested_relative = ../nested_relative" > main/.hgsub
+echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub
 hg -R main add
 hg -R main ci -m "add subrepos"
 cd ..
--- a/tests/test-subrepo-svn	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-subrepo-svn	Mon Mar 29 15:51:26 2010 -0500
@@ -10,11 +10,11 @@
 escapedwd=`pwd | fix_path`
 # SVN wants all paths to start with a slash. Unfortunately,
 # Windows ones don't. Handle that.
-expr $escapedwd : "\/" > /dev/null
+expr "$escapedwd" : "\/" > /dev/null
 if [ $? -ne 0 ]; then
-    escapedwd='/'$escapedwd
+    escapedwd="/$escapedwd"
 fi
-filterpath="sed s|$escapedwd|/root|"
+filterpath="s|$escapedwd|/root|"
 filtersvn='s/ in transaction.*/ is out of date/;s/Out of date: /File /'
 
 echo % create subversion repo
@@ -22,7 +22,7 @@
 SVNREPO="file://$escapedwd/svn-repo"
 WCROOT="`pwd`/svn-wc"
 svnadmin create svn-repo
-svn co $SVNREPO svn-wc
+svn co "$SVNREPO" svn-wc
 cd svn-wc
 mkdir src
 echo alpha > src/alpha
@@ -33,7 +33,7 @@
 svn ci -m 'Add alpha'
 svn up
 cat > extdef <<EOF
-externals -r1 $SVNREPO/externals
+externals -r1 "$SVNREPO/externals"
 EOF
 svn propset -F extdef svn:externals src
 svn ci -m 'Setting externals'
@@ -51,18 +51,18 @@
 
 echo % add first svn sub with leading whitespaces
 echo "s = [svn]       $SVNREPO/src" >> .hgsub
-svn co --quiet $SVNREPO/src s
+svn co --quiet "$SVNREPO"/src s
 hg add .hgsub
 hg ci -m1
 echo % debugsub
-hg debugsub | $filterpath
+hg debugsub | sed "$filterpath"
 
 echo
 echo % change file in svn and hg, commit
 echo a >> a
 echo alpha >> s/alpha
 hg commit -m 'Message!'
-hg debugsub | $filterpath
+hg debugsub | sed "$filterpath"
 
 echo
 echo a > s/a
@@ -104,4 +104,4 @@
 hg clone t tc | fix_path
 cd tc
 echo % debugsub in clone
-hg debugsub | $filterpath
+hg debugsub | sed "$filterpath"
--- a/tests/test-symlinks	Mon Mar 29 15:16:38 2010 -0500
+++ b/tests/test-symlinks	Mon Mar 29 15:51:26 2010 -0500
@@ -51,7 +51,7 @@
 cd x
 touch f
 hg add f
-hg status $p/y/f
+hg status "$p"/y/f
 
 echo '# try symlink outside repo to file inside'
 ln -s x/f ../z