# HG changeset patch # User Pierre-Yves David # Date 1492681437 -7200 # Node ID 2d55ae0d6ce7bb182d6fdae46cfb0d4266041245 # Parent fff7a678f6591a153b6560acec8e8d3c4b3474e4 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. diff -r fff7a678f659 -r 2d55ae0d6ce7 README --- 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 ------------------- diff -r fff7a678f659 -r 2d55ae0d6ce7 hgext3rd/evolve/serveronly.py --- 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' diff -r fff7a678f659 -r 2d55ae0d6ce7 tests/test-evolve-serveronly-bundle2.t --- 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 < [experimental] + > obshashrange = True + > EOF + $ cd client + $ hg pull ssh + pulling from ssh://user@dummy/server/ + searching for changes + no changes found