Patchwork [4,of,7,stable] bundle-tests: operate from outside a repository

login
register
mail settings
Submitter Pierre-Yves David
Date Feb. 10, 2017, 5:53 p.m.
Message ID <27ef75df203505964fbb.1486749185@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/18402/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Pierre-Yves David - Feb. 10, 2017, 5:53 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1486746372 -3600
#      Fri Feb 10 18:06:12 2017 +0100
# Branch stable
# Node ID 27ef75df203505964fbb20ac38ba737c3564d1a8
# Parent  0f8b506dc5406a9c9ebaab67495ff231c58663fc
# EXP-Topic getbundleerror
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.

Patch

diff -r 0f8b506dc540 -r 27ef75df2035 tests/test-bundle2-exchange.t
--- 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