serveronly: fix reposetup stable
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Thu, 20 Apr 2017 11:43:57 +0200
branchstable
changeset 2276 2d55ae0d6ce7
parent 2275 fff7a678f659
child 2277 61d885899466
serveronly: fix reposetup The local 'reposetup' function was shadowing the extension helper one. We add a test for obshashrange using 'serveronly' since this is the item that made use discover the issue.
README
hgext3rd/evolve/serveronly.py
tests/test-evolve-serveronly-bundle2.t
--- a/README	Thu Apr 20 11:41:20 2017 +0200
+++ b/README	Thu Apr 20 11:43:57 2017 +0200
@@ -119,6 +119,7 @@
  - template: adapt to change in 4.2,
  - fix 'debugrecordpruneparents' (outdated API usage)
  - checkheads: give priority to updated 4.2 code,
+ - serveronly: fix repository initialization.
 
 6.0.0 -- 2017-02-31
 -------------------
--- a/hgext3rd/evolve/serveronly.py	Thu Apr 20 11:41:20 2017 +0200
+++ b/hgext3rd/evolve/serveronly.py	Thu Apr 20 11:43:57 2017 +0200
@@ -43,7 +43,7 @@
 cmdtable = eh.cmdtable
 
 @eh.reposetup
-def reposetup(ui, repo):
+def default2evolution(ui, repo):
     evolveopts = ui.configlist('experimental', 'evolution')
     if not evolveopts:
         evolveopts = 'all'
--- a/tests/test-evolve-serveronly-bundle2.t	Thu Apr 20 11:41:20 2017 +0200
+++ b/tests/test-evolve-serveronly-bundle2.t	Thu Apr 20 11:43:57 2017 +0200
@@ -7,6 +7,8 @@
   > [web]
   > push_ssl = false
   > allow_push = *
+  > [ui]
+  > ssh=python "$RUNTESTDIR/dummyssh"
   > [phases]
   > publish = False
   > [experimental]
@@ -41,6 +43,8 @@
   $ cat ./errors.log
   $ echo "[extensions]" >> ./client/.hg/hgrc
   $ echo "evolve=" >> ./client/.hg/hgrc
+  $ echo "[paths]" >> ./client/.hg/hgrc
+  $ echo "ssh=ssh://user@dummy/server/" >> ./client/.hg/hgrc
   $ cp -r client other
 
 Smoke testing
@@ -173,3 +177,16 @@
   capabilities: _evoext_getbundle_obscommon _evoext_obshash_0 _evoext_obshash_1 _evoext_pullobsmarkers_0 _evoext_pushobsmarkers_0 batch * (glob)
   $ curl -s http://localhost:$HGPORT/?cmd=capabilities
   _evoext_getbundle_obscommon _evoext_obshash_0 _evoext_obshash_1 _evoext_pullobsmarkers_0 _evoext_pushobsmarkers_0 batch * (no-eol) (glob)
+
+Test obshashrange discover
+===========================================
+
+  $ cat >> $HGRCPATH <<EOF
+  > [experimental]
+  > obshashrange = True
+  > EOF
+  $ cd client
+  $ hg pull ssh
+  pulling from ssh://user@dummy/server/
+  searching for changes
+  no changes found