tests/test-discovery-obshashrange.t
branchmercurial-4.7
changeset 4512 7a779a288793
parent 4359 2cbb9914d227
parent 4511 e4fc3af2d0a9
child 4513 d70db7e455dc
child 4672 653c42af172e
--- a/tests/test-discovery-obshashrange.t	Tue Jan 22 12:54:43 2019 -0500
+++ b/tests/test-discovery-obshashrange.t	Thu Apr 11 22:41:41 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