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

login
register
mail settings
Submitter Sune Foldager
Date Oct. 17, 2014, 1:14 p.m.
Message ID <e4f93393a4e62d3d8fd4.1413551692@Cuivienen.local>
Download mbox | patch
Permalink /patch/6360/
State Superseded
Headers show

Comments

Sune Foldager - Oct. 17, 2014, 1:14 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.

Patch

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))