[PATCH 1 of 8] changegroup: add a "packermap" dictionary to track different packer version

Sune Foldager sune.foldager at me.com
Fri Oct 17 08:14:52 CDT 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1411619046 25200
#      Wed Sep 24 21:24:06 2014 -0700
# Node ID e4f93393a4e62d3d8fd4e26acfde28d1abef11f1
# Parent  840be5ca03e1db16ba994e55597771c418166c97
changegroup: add a "packermap" dictionary to track different packer version

We only have one right now (HG10) 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 side.

diff -r 840be5ca03e1 -r e4f93393a4e6 mercurial/changegroup.py
--- a/mercurial/changegroup.py	Sat Oct 04 16:46:50 2014 +0900
+++ 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 = {'HG10': (cg1packer, cg1unpacker)}
+
 def _changegroupinfo(repo, nodes, source):
     if repo.ui.verbose or source == 'bundle':
         repo.ui.status(_("%d changesets found\n") % len(nodes))


More information about the Mercurial-devel mailing list