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

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 17, 2014, 7:56 p.m.
Message ID <7571e3b56091ecd772a4.1413575785@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/6386/
State Changes Requested
Headers show

Comments

Pierre-Yves David - Oct. 17, 2014, 7:56 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 7571e3b56091ecd772a4b845a1c72cae3a9abf25
# Parent  149fc8a44184fbeddd9d9602e3860455e92c1301
changegroup: add a "packermap" dictionary to track different packer version

We only have one right now "01" 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.
Matt Mackall - Oct. 18, 2014, 10:52 p.m.
On Fri, 2014-10-17 at 12:56 -0700, Pierre-Yves David wrote:
> # 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 7571e3b56091ecd772a4b845a1c72cae3a9abf25
> # Parent  149fc8a44184fbeddd9d9602e3860455e92c1301
> changegroup: add a "packermap" dictionary to track different packer version

Punting this to November.

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -431,10 +431,12 @@  class cg1packer(object):
         yield delta
     def builddeltaheader(self, node, p1n, p2n, basenode, linknode):
         # 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))
     if repo.ui.debugflag:
         repo.ui.debug("list of changesets:\n")