Patchwork D746: changegroup: remove dictionary creation from deltachunk

login
register
mail settings
Submitter phabricator
Date Sept. 20, 2017, 5:56 p.m.
Message ID <be0b35d2f0320c2b98728e764d36ea6f@localhost.localdomain>
Download mbox | patch
Permalink /patch/24064/
State Not Applicable
Headers show

Comments

phabricator - Sept. 20, 2017, 5:56 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG05131c963767: changegroup: remove dictionary creation from deltachunk (authored by durham, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D746?vs=1934&id=1945

REVISION DETAIL
  https://phab.mercurial-scm.org/D746

AFFECTED FILES
  mercurial/changegroup.py

CHANGE DETAILS




To: durham, #hg-reviewers, martinvonz
Cc: mercurial-devel

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -188,8 +188,7 @@ 
         header = struct.unpack(self.deltaheader, headerdata)
         delta = readexactly(self._stream, l - self.deltaheadersize)
         node, p1, p2, deltabase, cs, flags = self._deltaheader(header, prevnode)
-        return {'node': node, 'p1': p1, 'p2': p2, 'cs': cs,
-                'deltabase': deltabase, 'delta': delta, 'flags': flags}
+        return (node, p1, p2, cs, deltabase, delta, flags)
 
     def getchunks(self):
         """returns all the chunks contains in the bundle
@@ -438,17 +437,9 @@ 
         """
         chain = None
         for chunkdata in iter(lambda: self.deltachunk(chain), {}):
-            node = chunkdata['node']
-            p1 = chunkdata['p1']
-            p2 = chunkdata['p2']
-            cs = chunkdata['cs']
-            deltabase = chunkdata['deltabase']
-            delta = chunkdata['delta']
-            flags = chunkdata['flags']
-
-            chain = node
-
-            yield (node, p1, p2, cs, deltabase, delta, flags)
+            # Chunkdata: (node, p1, p2, cs, deltabase, delta, flags)
+            yield chunkdata
+            chain = chunkdata[0]
 
 class cg2unpacker(cg1unpacker):
     """Unpacker for cg2 streams.