tests: reorder hg serve commands
authorJun Wu <quark@fb.com>
Tue, 15 Mar 2016 09:51:54 +0000
changeset 30851 e01bd7385f4f2c99e14532a3fd27e6436fe42ca1
parent 30850 b7a31068cc80be5b848deaa6bda9ae117fcc13c8
child 30852 e2b9145e35d8f27a69993120fcb7a0f1d743105b
push id208
push usergszorc@mozilla.com
push dateSat, 19 Mar 2016 01:42:47 +0000
tests: reorder hg serve commands chg currently does not support hg serve -d. It has a quick path testing if the command is hg serve -d and fallbacks to hg if so. But the test only works if "serve" is the first argument since the test wants to avoid false positives (for example, "-r serve" is different). This patch reorders "hg server" commands in tests, making them chg friendly.
tests/test-bookmarks-pushpull.t
tests/test-bundle2-exchange.t
tests/test-fetch.t
tests/test-hgweb.t
tests/test-http-bundle1.t
tests/test-http-proxy.t
tests/test-http.t
tests/test-https.t
tests/test-largefiles-wireproto.t
tests/test-pull-r.t
tests/test-ssh-bundle1.t
tests/test-transplant.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -285,17 +285,17 @@ update a remote bookmark from a non-head
 update a bookmark in the middle of a client pulling changes
 
   $ cd ..
   $ hg clone -q a pull-race
 
 We want to use http because it is stateless and therefore more susceptible to
 race conditions
 
-  $ hg -R pull-race serve -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
+  $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
   $ cat pull-race.pid >> $DAEMON_PIDS
 
   $ hg clone -q http://localhost:$HGPORT/ pull-race2
   $ cd pull-race
   $ hg up -q Y
   $ echo c4 > f2
   $ hg ci -Am4
   $ echo c5 > f3
@@ -303,17 +303,17 @@ race conditions
   > [hooks]
   > outgoing.makecommit = hg ci -Am5; echo committed in pull-race
   > EOF
 
 (new config needs a server restart)
 
   $ cd ..
   $ killdaemons.py
-  $ hg -R pull-race serve -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
+  $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
   $ cat pull-race.pid >> $DAEMON_PIDS
   $ cd pull-race2
   $ hg -R $TESTTMP/pull-race book
      @                         1:0d2164f0ce0d
      X                         1:0d2164f0ce0d
    * Y                         4:b0a5eff05604
      Z                         1:0d2164f0ce0d
   $ hg pull
@@ -340,17 +340,17 @@ Update a bookmark right after the initia
   > # during lookup. This makes the commit appear before the actual getbundle
   > # call.
   > listkeys.makecommit= ((hg st | grep -q M) && (hg commit -m race; echo commited in pull-race)) || exit 0
   > EOF
 
 (new config need server restart)
 
   $ killdaemons.py
-  $ hg -R ../pull-race serve -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log
+  $ hg serve -R ../pull-race -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log
   $ cat ../pull-race.pid >> $DAEMON_PIDS
 
   $ hg -R $TESTTMP/pull-race book
      @                         1:0d2164f0ce0d
      X                         1:0d2164f0ce0d
    * Y                         5:35d1ef0a8d1b
      Z                         1:0d2164f0ce0d
   $ hg pull -B Y
@@ -399,17 +399,17 @@ diverging a remote bookmark fails
   $ hg book -f Y
 
   $ cat <<EOF > ../a/.hg/hgrc
   > [web]
   > push_ssl = false
   > allow_push = *
   > EOF
 
-  $ hg -R ../a serve -p $HGPORT2 -d --pid-file=../hg2.pid
+  $ hg serve -R ../a -p $HGPORT2 -d --pid-file=../hg2.pid
   $ cat ../hg2.pid >> $DAEMON_PIDS
 
   $ hg push http://localhost:$HGPORT2/
   pushing to http://localhost:$HGPORT2/
   searching for changes
   abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
   (merge or see "hg help push" for details about pushing new heads)
   [255]
@@ -782,17 +782,17 @@ Check hook preventing push (issue4455)
   $ cat >> ../issue4455-dest/.hg/hgrc << EOF
   > [hooks]
   > prepushkey=false
   > [web]
   > push_ssl = false
   > allow_push = *
   > EOF
   $ killdaemons.py
-  $ hg -R ../issue4455-dest serve -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log
+  $ hg serve -R ../issue4455-dest -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log
   $ cat ../issue4455.pid >> $DAEMON_PIDS
 
 Local push
 ----------
 
   $ hg push -B @ local
   pushing to $TESTTMP/issue4455-dest (glob)
   searching for changes
--- a/tests/test-bundle2-exchange.t
+++ b/tests/test-bundle2-exchange.t
@@ -296,17 +296,17 @@ pull over ssh
   $ hg -R other debugobsolete
   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
 
 pull over http
 
-  $ hg -R main serve -p $HGPORT -d --pid-file=main.pid -E main-error.log
+  $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log
   $ cat main.pid >> $DAEMON_PIDS
 
   $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc
   pulling from http://localhost:$HGPORT/
   searching for changes
   adding changesets
   adding manifests
   adding file changes
@@ -367,17 +367,17 @@ push over ssh
   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
 
 push over http
 
-  $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
+  $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
   $ cat other.pid >> $DAEMON_PIDS
 
   $ hg -R main phase --public 32af7686d403
   pre-close-tip:02de42196ebe draft book_02de
   postclose-tip:02de42196ebe draft book_02de
   txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob)
   $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
   pushing to http://localhost:$HGPORT2/
@@ -493,17 +493,17 @@ Setting up
   $ cd ..
 
   $ cat << EOF >> $HGRCPATH
   > [extensions]
   > failpush=$TESTTMP/failpush.py
   > EOF
 
   $ killdaemons.py
-  $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
+  $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
   $ cat other.pid >> $DAEMON_PIDS
 
 Doing the actual push: Abort error
 
   $ cat << EOF >> $HGRCPATH
   > [failpush]
   > reason = abort
   > EOF
@@ -591,17 +591,17 @@ Doing the actual push: hook abort
   > [failpush]
   > reason =
   > [hooks]
   > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false"
   > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'"
   > EOF
 
   $ killdaemons.py
-  $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
+  $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
   $ cat other.pid >> $DAEMON_PIDS
 
   $ hg -R main push other -r e7ec4e813ba6
   pushing to other
   searching for changes
   remote: adding changesets
   remote: adding manifests
   remote: adding file changes
@@ -656,17 +656,17 @@ Doing the actual push: hook abort
   other/.hg/store/00changelog.i
 
 Check error from hook during the unbundling process itself
 
   $ cat << EOF >> $HGRCPATH
   > pretxnchangegroup = sh -c "echo 'Fail early!'; false"
   > EOF
   $ killdaemons.py # reload http config
-  $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
+  $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
   $ cat other.pid >> $DAEMON_PIDS
 
   $ hg -R main push other -r e7ec4e813ba6
   pushing to other
   searching for changes
   remote: adding changesets
   remote: adding manifests
   remote: adding file changes
@@ -780,17 +780,17 @@ Check abort from mandatory pushkey
   > [hooks]
   > pretxnchangegroup=
   > pretxnclose.failpush=
   > prepushkey.failpush = sh -c "echo 'do not push the key !'; false"
   > [extensions]
   > mandatorypart=$TESTTMP/mandatorypart.py
   > EOF
   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
-  $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
+  $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
   $ cat other.pid >> $DAEMON_PIDS
 
 (Failure from a hook)
 
   $ hg -R main push other -r e7ec4e813ba6
   pushing to other
   searching for changes
   adding changesets
@@ -852,17 +852,17 @@ Check abort from mandatory pushkey
   >         raise error.Abort('Clown phase push failed')
   >     pushop.pkfailcb[part.id] = fail
   > EOF
   $ cat >> $HGRCPATH << EOF
   > [hooks]
   > prepushkey.failpush =
   > EOF
   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
-  $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
+  $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
   $ cat other.pid >> $DAEMON_PIDS
 
   $ hg -R main push other -r e7ec4e813ba6
   pushing to other
   searching for changes
   adding changesets
   adding manifests
   adding file changes
--- a/tests/test-fetch.t
+++ b/tests/test-fetch.t
@@ -59,17 +59,17 @@ should merge c into a
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   merging with 1:d36c0562f908
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   new changeset 3:a323a0c43ec4 merges remote changes with local
   $ ls c
   a
   b
   c
-  $ hg --cwd a serve -a localhost -p $HGPORT -d --pid-file=hg.pid
+  $ hg serve --cwd a -a localhost -p $HGPORT -d --pid-file=hg.pid
   $ cat a/hg.pid >> "$DAEMON_PIDS"
 
 fetch over http, no auth
 (this also tests that editor is invoked if '--edit' is specified)
 
   $ HGEDITOR=cat hg --cwd d fetch --edit http://localhost:$HGPORT/
   pulling from http://localhost:$HGPORT/
   searching for changes
--- a/tests/test-hgweb.t
+++ b/tests/test-hgweb.t
@@ -695,33 +695,33 @@ no style can be loaded from directories 
 
 errors
 
   $ cat errors.log
 
 Uncaught exceptions result in a logged error and canned HTTP response
 
   $ killdaemons.py
-  $ hg --config extensions.hgweberror=$TESTDIR/hgweberror.py serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
+  $ hg serve --config extensions.hgweberror=$TESTDIR/hgweberror.py -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
   $ cat hg.pid >> $DAEMON_PIDS
 
   $ get-with-headers.py localhost:$HGPORT 'raiseerror' transfer-encoding content-type
   500 Internal Server Error
   transfer-encoding: chunked
   
   Internal Server Error (no-eol)
   [1]
 
   $ killdaemons.py
   $ head -1 errors.log
   .* Exception happened during processing request '/raiseerror': (re)
 
 Uncaught exception after partial content sent
 
-  $ hg --config extensions.hgweberror=$TESTDIR/hgweberror.py serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
+  $ hg serve --config extensions.hgweberror=$TESTDIR/hgweberror.py -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
   $ cat hg.pid >> $DAEMON_PIDS
   $ get-with-headers.py localhost:$HGPORT 'raiseerror?partialresponse=1' transfer-encoding content-type
   200 Script output follows
   transfer-encoding: chunked
   content-type: text/plain
   
   partial content
   Internal Server Error (no-eol)
--- a/tests/test-http-bundle1.t
+++ b/tests/test-http-bundle1.t
@@ -17,17 +17,17 @@ parts that are not bundle1/bundle2 speci
   $ echo bar>foo.d/bAr.hg.d/BaR
   $ echo bar>foo.d/baR.d.hg/bAR
   $ hg commit -A -m 1
   adding foo
   adding foo.d/bAr.hg.d/BaR
   adding foo.d/baR.d.hg/bAR
   adding foo.d/foo
   $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
-  $ hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid
+  $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
 
 Test server address cannot be reused
 
 #if windows
   $ hg serve -p $HGPORT1 2>&1
   abort: cannot start server at ':$HGPORT1': * (glob)
   [255]
 #else
@@ -158,17 +158,17 @@ test http authentication
   >     if not auth:
   >         raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
   >                 [('WWW-Authenticate', 'Basic Realm="mercurial"')])
   >     if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
   >         raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
   > def extsetup():
   >     common.permhooks.insert(0, perform_authentication)
   > EOT
-  $ hg --config extensions.x=userpass.py serve -p $HGPORT2 -d --pid-file=pid \
+  $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
   >    --config server.preferuncompressed=True \
   >    --config web.push_ssl=False --config web.allow_push=* -A ../access.log
   $ cat pid >> $DAEMON_PIDS
 
   $ cat << EOF > get_pass.py
   > import getpass
   > def newgetpass(arg):
   >   return "pass"
--- a/tests/test-http-proxy.t
+++ b/tests/test-http-proxy.t
@@ -6,17 +6,17 @@
   > bundle2-exp = True
   > EOF
 
   $ hg init a
   $ cd a
   $ echo a > a
   $ hg ci -Ama -d '1123456789 0'
   adding a
-  $ hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=hg.pid
+  $ hg serve --config server.uncompressed=True -p $HGPORT -d --pid-file=hg.pid
   $ cat hg.pid >> $DAEMON_PIDS
   $ cd ..
   $ tinyproxy.py $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
   $ while [ ! -f proxy.pid ]; do sleep 0; done
   $ cat proxy.pid >> $DAEMON_PIDS
 
 url for proxy, stream
 
--- a/tests/test-http.t
+++ b/tests/test-http.t
@@ -8,17 +8,17 @@
   $ echo bar>foo.d/bAr.hg.d/BaR
   $ echo bar>foo.d/baR.d.hg/bAR
   $ hg commit -A -m 1
   adding foo
   adding foo.d/bAr.hg.d/BaR
   adding foo.d/baR.d.hg/bAR
   adding foo.d/foo
   $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
-  $ hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid
+  $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
 
 Test server address cannot be reused
 
 #if windows
   $ hg serve -p $HGPORT1 2>&1
   abort: cannot start server at ':$HGPORT1': * (glob)
   [255]
 #else
@@ -149,17 +149,17 @@ test http authentication
   >     if not auth:
   >         raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
   >                 [('WWW-Authenticate', 'Basic Realm="mercurial"')])
   >     if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
   >         raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
   > def extsetup():
   >     common.permhooks.insert(0, perform_authentication)
   > EOT
-  $ hg --config extensions.x=userpass.py serve -p $HGPORT2 -d --pid-file=pid \
+  $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
   >    --config server.preferuncompressed=True \
   >    --config web.push_ssl=False --config web.allow_push=* -A ../access.log
   $ cat pid >> $DAEMON_PIDS
 
   $ cat << EOF > get_pass.py
   > import getpass
   > def newgetpass(arg):
   >   return "pass"
--- a/tests/test-https.t
+++ b/tests/test-https.t
@@ -259,26 +259,26 @@ cacert mismatch
   $ hg -R copy-pull pull --config web.cacerts=pub-other.pem --insecure
   pulling from https://localhost:$HGPORT/
   warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
   searching for changes
   no changes found
 
 Test server cert which isn't valid yet
 
-  $ hg -R test serve -p $HGPORT1 -d --pid-file=hg1.pid --certificate=server-not-yet.pem
+  $ hg serve -R test -p $HGPORT1 -d --pid-file=hg1.pid --certificate=server-not-yet.pem
   $ cat hg1.pid >> $DAEMON_PIDS
   $ hg -R copy-pull pull --config web.cacerts=pub-not-yet.pem https://localhost:$HGPORT1/
   pulling from https://localhost:$HGPORT1/
   abort: error: *certificate verify failed* (glob)
   [255]
 
 Test server cert which no longer is valid
 
-  $ hg -R test serve -p $HGPORT2 -d --pid-file=hg2.pid --certificate=server-expired.pem
+  $ hg serve -R test -p $HGPORT2 -d --pid-file=hg2.pid --certificate=server-expired.pem
   $ cat hg2.pid >> $DAEMON_PIDS
   $ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/
   pulling from https://localhost:$HGPORT2/
   abort: error: *certificate verify failed* (glob)
   [255]
 
 Fingerprints
 
--- a/tests/test-largefiles-wireproto.t
+++ b/tests/test-largefiles-wireproto.t
@@ -40,17 +40,17 @@ vanilla clients not locked out from larg
   adding changesets
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 largefiles clients still work with vanilla servers
-  $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
+  $ hg serve --config extensions.largefiles=! -R r1 -d -p $HGPORT1 --pid-file hg.pid
   $ cat hg.pid >> $DAEMON_PIDS
   $ hg clone http://localhost:$HGPORT1 r3
   requesting all changes
   adding changesets
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
   updating to branch default
@@ -144,17 +144,17 @@ largefiles clients refuse to push largef
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd r7
   $ echo c2 > f2
   $ hg add --large f2
   $ hg commit -m "m2"
   Invoking status precommit hook
   A f2
-  $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
+  $ hg serve --config extensions.largefiles=! -R ../r6 -d -p $HGPORT --pid-file ../hg.pid
   $ cat ../hg.pid >> $DAEMON_PIDS
   $ hg push http://localhost:$HGPORT
   pushing to http://localhost:$HGPORT/
   searching for changes
   abort: http://localhost:$HGPORT/ does not appear to be a largefile store
   [255]
   $ cd ..
 
--- a/tests/test-pull-r.t
+++ b/tests/test-pull-r.t
@@ -107,17 +107,17 @@ We pull '-U -r <name>' and the name chan
 We use http because http is better is our racy-est option.
 
 
   $ echo babar > ../repo/jungle
   $ cat <<EOF > ../repo/.hg/hgrc
   > [hooks]
   > outgoing.makecommit = hg ci -Am 'racy commit'; echo committed in pull-race
   > EOF
-  $ hg -R ../repo serve -p $HGPORT2 -d --pid-file=../repo.pid
+  $ hg serve -R ../repo -p $HGPORT2 -d --pid-file=../repo.pid
   $ cat ../repo.pid >> $DAEMON_PIDS
   $ hg pull --rev default --update http://localhost:$HGPORT2/
   pulling from http://localhost:$HGPORT2/
   searching for changes
   adding changesets
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
--- a/tests/test-ssh-bundle1.t
+++ b/tests/test-ssh-bundle1.t
@@ -372,18 +372,18 @@ parameters:
   abort: no suitable response from remote hg!
   [255]
 
   $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo"
   remote: Illegal command "hacking -R 'a'\''repo' serve --stdio"
   abort: no suitable response from remote hg!
   [255]
 
-  $ 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
+  $ 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]
 
 Test hg-ssh in read-only mode:
 
   $ cat > ssh.sh << EOF
   > userhost="\$1"
   > SSH_ORIGINAL_COMMAND="\$2"
   > export SSH_ORIGINAL_COMMAND
--- a/tests/test-transplant.t
+++ b/tests/test-transplant.t
@@ -316,17 +316,17 @@ skip local changes transplanted to the s
   $ hg transplant -s ../remote -a -b tip
   searching for changes
   applying 4333daefcb15
   4333daefcb15 transplanted to 5f42c04e07cc
 
 
 remote transplant with pull
 
-  $ hg -R ../t serve -p $HGPORT -d --pid-file=../t.pid
+  $ hg serve -R ../t -p $HGPORT -d --pid-file=../t.pid
   $ cat ../t.pid >> $DAEMON_PIDS
 
   $ hg clone -r 0 ../t ../rp
   adding changesets
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
   updating to branch default