Patchwork [3,of,5,more-in-stack] bundle: use None when unpacking uncompressed changegroup

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 18, 2015, 12:18 a.m.
Message ID <96ec55c3c5c23d979023.1442535524@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/10531/
State Accepted
Headers show

Comments

Pierre-Yves David - Sept. 18, 2015, 12:18 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1442016346 25200
#      Fri Sep 11 17:05:46 2015 -0700
# Node ID 96ec55c3c5c23d979023ce6b96cd33023c630792
# Parent  2bb46f719cfd16ce8385a928546f81aea334fbad
bundle: use None when unpacking uncompressed changegroup

Let's be more modern!

Patch

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -1172,11 +1172,11 @@  def handlechangegroup(op, inpart):
     # for the whole processing scope.
     op.gettransaction()
     unpackerversion = inpart.params.get('version', '01')
     # We should raise an appropriate exception here
     unpacker = changegroup.packermap[unpackerversion][1]
-    cg = unpacker(inpart, 'UN')
+    cg = unpacker(inpart, None)
     # the source and url passed here are overwritten by the one contained in
     # the transaction.hookargs argument. So 'bundle2' is a placeholder
     nbchangesets = None
     if 'nbchanges' in inpart.params:
         nbchangesets = int(inpart.params.get('nbchanges'))