tests/test-discovery-obshashrange.t
branchstable
changeset 4479 2db0aca03a88
parent 4335 b2e2f9fe7a45
child 4511 e4fc3af2d0a9
child 4643 77f3699e711e
--- a/tests/test-discovery-obshashrange.t	Wed Feb 13 21:39:10 2019 +0800
+++ b/tests/test-discovery-obshashrange.t	Tue Apr 09 20:45:36 2019 +0200
@@ -1158,3 +1158,64 @@
   saved backup bundle to $TESTTMP/client/.hg/strip-backup/c8d03c1b5e94-b257442b-backup.hg
   $ f -s .hg/cache/evoext*
   .hg/cache/evoext-obscache-00: size=70
+  $ cd ..
+
+Check capabilities advertisement
+================================
+
+  $ hg init with-evolve
+  $ cat << EOF >> with-evolve/.hg/hgrc
+  > [experimental]
+  > evolution.exchange=yes
+  > EOF
+  $ hg init without-evolve
+  $ cat << EOF >> without-evolve/.hg/hgrc
+  > [experimental]
+  > evolution.exchange=no
+  > EOF
+
+  $ hg debugcapabilities ssh://user@dummy/with-evolve | grep _evoext
+    _evoext_getbundle_obscommon
+    _evoext_obshash_0
+    _evoext_obshash_1
+    _evoext_obshashrange_v1
+  $ hg debugcapabilities ssh://user@dummy/without-evolve | grep _evoext
+  [1]
+
+Using http:
+
+  $ cat > web.conf << EOF
+  > [paths]
+  > / = *
+  > EOF
+
+(evolve version first)
+
+  $ hg serve --web-conf web.conf -p $HGPORT -d --pid-file hg.pid
+  $ cat hg.pid >> $DAEMON_PIDS
+
+  $ hg debugcapabilities http://localhost:$HGPORT/with-evolve| grep _evoext
+    _evoext_getbundle_obscommon
+    _evoext_obshash_0
+    _evoext_obshash_1
+    _evoext_obshashrange_v1
+  $ hg debugcapabilities http://localhost:$HGPORT/without-evolve| grep _evoext
+  [1]
+
+  $ killdaemons.py
+
+
+(evolve version second)
+
+  $ hg serve --web-conf web.conf -p $HGPORT -d --pid-file hg.pid
+  $ cat hg.pid >> $DAEMON_PIDS
+
+  $ hg debugcapabilities http://localhost:$HGPORT/without-evolve| grep _evoext
+  [1]
+  $ hg debugcapabilities http://localhost:$HGPORT/with-evolve| grep _evoext
+    _evoext_getbundle_obscommon
+    _evoext_obshash_0
+    _evoext_obshash_1
+    _evoext_obshashrange_v1
+
+  $ killdaemons.py