changeset 30911:f3c5a8a4dfd0 stable

bundle-tests: operate from outside a repository We are about to add a test for ssh pull/cloning being denied because of bundle1 usage. For this, it is cleaner to not operate from the clone using http. So we update the test beforehand for clarity. This is more churns that what I'm happy to see on stable, but the rests of the series is worth it in my opinion.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 10 Feb 2017 18:06:12 +0100
parents accaa04f951c
children 3d4afc2fdcd7
files tests/test-bundle2-exchange.t
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-bundle2-exchange.t	Fri Feb 10 17:56:52 2017 +0100
+++ b/tests/test-bundle2-exchange.t	Fri Feb 10 18:06:12 2017 +0100
@@ -1024,11 +1024,12 @@
 
 Verify the global server.bundle1 option works
 
-  $ cat > .hg/hgrc << EOF
+  $ cd ..
+  $ cat > bundle2onlyserver/.hg/hgrc << EOF
   > [server]
   > bundle1 = false
   > EOF
-  $ hg serve -p $HGPORT -d --pid-file=hg.pid
+  $ hg -R bundle2onlyserver serve -p $HGPORT -d --pid-file=hg.pid
   $ cat hg.pid >> $DAEMON_PIDS
   $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2
   requesting all changes
@@ -1038,11 +1039,11 @@
   [255]
   $ killdaemons.py
 
-  $ cat > .hg/hgrc << EOF
+  $ cat > bundle2onlyserver/.hg/hgrc << EOF
   > [server]
   > bundle1gd = false
   > EOF
-  $ hg serve -p $HGPORT -d --pid-file=hg.pid
+  $ hg -R bundle2onlyserver serve -p $HGPORT -d --pid-file=hg.pid
   $ cat hg.pid >> $DAEMON_PIDS
 
   $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
@@ -1054,7 +1055,7 @@
 
   $ killdaemons.py
 
-  $ cd ../notgdserver
+  $ cd notgdserver
   $ cat > .hg/hgrc << EOF
   > [server]
   > bundle1gd = false