Patchwork D744: debug: update debugbundle to use new deltaiter api

login
register
mail settings
Submitter phabricator
Date Sept. 20, 2017, 5:56 p.m.
Message ID <cbd265c252c589ac78936f8d1fad560f@localhost.localdomain>
Download mbox | patch
Permalink /patch/24065/
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 rHG311f6ccf8f23: debug: update debugbundle to use new deltaiter api (authored by durham, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D744?vs=1932&id=1943

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

AFFECTED FILES
  mercurial/debugcommands.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -263,18 +263,11 @@ 
 
         def showchunks(named):
             ui.write("\n%s%s\n" % (indent_string, named))
-            chain = None
-            for chunkdata in iter(lambda: gen.deltachunk(chain), {}):
-                node = chunkdata['node']
-                p1 = chunkdata['p1']
-                p2 = chunkdata['p2']
-                cs = chunkdata['cs']
-                deltabase = chunkdata['deltabase']
-                delta = chunkdata['delta']
+            for deltadata in gen.deltaiter():
+                node, p1, p2, cs, deltabase, delta, flags = deltadata
                 ui.write("%s%s %s %s %s %s %s\n" %
                          (indent_string, hex(node), hex(p1), hex(p2),
                           hex(cs), hex(deltabase), len(delta)))
-                chain = node
 
         chunkdata = gen.changelogheader()
         showchunks("changelog")
@@ -287,11 +280,9 @@ 
         if isinstance(gen, bundle2.unbundle20):
             raise error.Abort(_('use debugbundle2 for this file'))
         chunkdata = gen.changelogheader()
-        chain = None
-        for chunkdata in iter(lambda: gen.deltachunk(chain), {}):
-            node = chunkdata['node']
+        for deltadata in gen.deltaiter():
+            node, p1, p2, cs, deltabase, delta, flags = deltadata
             ui.write("%s%s\n" % (indent_string, hex(node)))
-            chain = node
 
 def _debugobsmarkers(ui, part, indent=0, **opts):
     """display version and markers contained in 'data'"""