evolve: update the capabilities and commands name for obshashrange
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 13 Mar 2017 16:53:42 -0700
changeset 2098 fc94c1909c18
parent 2097 c99e926d465a
child 2099 47017b3086d4
evolve: update the capabilities and commands name for obshashrange We makes is clear that these version are useful for earlier testing but they are not ready for any kind of real usage yet.
hgext3rd/evolve/obsdiscovery.py
--- a/hgext3rd/evolve/obsdiscovery.py	Mon Mar 13 16:05:33 2017 -0700
+++ b/hgext3rd/evolve/obsdiscovery.py	Mon Mar 13 16:53:42 2017 -0700
@@ -147,7 +147,8 @@
 
 def _canobshashrange(local, remote):
     return (local.ui.configbool('experimental', 'obshashrange', False)
-            and remote.capable('_evoext_obshashrange_1'))
+            and remote.capable('_donotusemeever_evoext_obshashrange_1'))
+
 
 def _obshashrange_capabilities(orig, repo, proto):
     """wrapper to advertise new capability"""
@@ -155,7 +156,7 @@
     enabled = repo.ui.configbool('experimental', 'obshashrange', False)
     if obsolete.isenabled(repo, obsolete.exchangeopt) and enabled:
         caps = caps.split()
-        caps.append('_evoext_obshashrange_1')
+        caps.append('_donotusemeever_evoext_obshashrange_1')
         caps.sort()
         caps = ' '.join(caps)
     return caps
@@ -324,7 +325,7 @@
     bundler = bundle2.bundle20(ui, bundle2.bundle2caps(remote))
     capsblob = bundle2.encodecaps(bundle2.getrepocaps(repo))
     bundler.newpart('replycaps', data=capsblob)
-    bundler.newpart('_evoexp_obsrangehash_0', data=gen())
+    bundler.newpart('_donotusemeever_evoext_obshashrange_1', data=gen())
 
     stream = util.chunkbuffer(bundler.getchunks())
     try:
@@ -341,11 +342,11 @@
         if exc.hint is not None:
             ui.status(_('remote: %s\n') % ('(%s)' % exc.hint))
         raise error.Abort(_('push failed on remote'))
-    for rep in op.records['_evoexp_obsrangehash_0']:
+    for rep in op.records['_donotusemeever_evoext_obshashrange_1']:
         yield mapping[rep['key']], rep['value']
 
 
-@bundle2.parthandler('_evoexp_obsrangehash_0', ())
+@bundle2.parthandler('_donotusemeever_evoext_obshashrange_1', ())
 def _processqueryrange(op, inpart):
     assert op.reply is not None
     replies = []
@@ -357,16 +358,16 @@
         rhash = _range(op.repo, r, index).obshash
         replies.append(data + rhash)
         data = inpart.read(24)
-    op.reply.newpart('reply:_evoexp_obsrangehash_0', data=iter(replies))
+    op.reply.newpart('reply:_donotusemeever_evoext_obshashrange_1', data=iter(replies))
 
 
-@bundle2.parthandler('reply:_evoexp_obsrangehash_0', ())
+@bundle2.parthandler('reply:_donotusemeever_evoext_obshashrange_1', ())
 def _processqueryrangereply(op, inpart):
     data = inpart.read(44)
     while data:
         key = data[:24]
         rhash = data[24:]
-        op.records.add('_evoexp_obsrangehash_0', {'key': key, 'value': rhash})
+        op.records.add('_donotusemeever_evoext_obshashrange_1', {'key': key, 'value': rhash})
         data = inpart.read(44)
 
 ##################################