Submitter | Sune Foldager |
---|---|
Date | Oct. 17, 2014, 1:14 p.m. |
Message ID | <a95c01e22321a83e2a22.1413551695@Cuivienen.local> |
Download | mbox | patch |
Permalink | /patch/6364/ |
State | Superseded |
Headers | show |
Comments
On 10/17/2014 06:14 AM, Sune Foldager wrote: > # HG changeset patch > # User Sune Foldager <cryo@cyanite.org> > # Date 1413549654 -7200 > # Fri Oct 17 14:40:54 2014 +0200 > # Node ID a95c01e22321a83e2a2271aeab4b53434b81edd9 > # Parent a26075a46a0da39db23d6dcefb4e1937da8d7bc2 > changegroup: use '1' for changegroup packer version 1 > > Using 'HG10' risks conflating bundle formats (HG10 and HG2X) > with changegroup formats (currently just 1). Note that HG10 is > the same as a changegroup in format 1, but HG2X is more general. > > This patch should probably be folded with the one introducing packermap. I did fold this patch in the previous one. I used a '01' to allow sorting of key on a bigger subset.
Patch
diff -r a26075a46a0d -r a95c01e22321 mercurial/bundle2.py --- a/mercurial/bundle2.py Wed Sep 24 21:33:12 2014 -0700 +++ b/mercurial/bundle2.py Fri Oct 17 14:40:54 2014 +0200 @@ -820,7 +820,7 @@ # we need to make sure we trigger the creation of a transaction object used # for the whole processing scope. op.gettransaction() - unpackerversion = inpart.params.get('version', 'HG10') + unpackerversion = inpart.params.get('version', '1') # We should raise an appropriate exception here unpacker = changegroup.packermap[unpackerversion][1] cg = unpacker(inpart, 'UN') diff -r a26075a46a0d -r a95c01e22321 mercurial/changegroup.py --- a/mercurial/changegroup.py Wed Sep 24 21:33:12 2014 -0700 +++ b/mercurial/changegroup.py Fri Oct 17 14:40:54 2014 +0200 @@ -433,7 +433,7 @@ # 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)} +packermap = {'1': (cg1packer, cg1unpacker)} def _changegroupinfo(repo, nodes, source): if repo.ui.verbose or source == 'bundle':