changegroup: add a "packermap" dictionary to track different packer versions
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 24 Sep 2014 21:24:06 -0700
changeset 23168 a92ba36a1a9d
parent 23166 30e0dcd7c5ff
child 23169 e4dc2b0be056
changegroup: add a "packermap" dictionary to track different packer versions We only have "01" right now, but we should get general delta in soon. Bundle2 is expected to make use of this to advertise and select the right packer to use on both sides.
mercurial/changegroup.py
--- a/mercurial/changegroup.py	Thu Oct 16 23:15:35 2014 -0700
+++ b/mercurial/changegroup.py	Wed Sep 24 21:24:06 2014 -0700
@@ -433,6 +433,8 @@
         # do nothing with basenode, it is implicitly the previous one in HG10
         return struct.pack(self.deltaheader, node, p1n, p2n, linknode)
 
+packermap = {'01': (cg1packer, cg1unpacker)}
+
 def _changegroupinfo(repo, nodes, source):
     if repo.ui.verbose or source == 'bundle':
         repo.ui.status(_("%d changesets found\n") % len(nodes))