2100 % indent_string) |
2100 % indent_string) |
2101 |
2101 |
2102 def showchunks(named): |
2102 def showchunks(named): |
2103 ui.write("\n%s%s\n" % (indent_string, named)) |
2103 ui.write("\n%s%s\n" % (indent_string, named)) |
2104 chain = None |
2104 chain = None |
2105 while True: |
2105 for chunkdata in iter(lambda: gen.deltachunk(chain), {}): |
2106 chunkdata = gen.deltachunk(chain) |
|
2107 if not chunkdata: |
|
2108 break |
|
2109 node = chunkdata['node'] |
2106 node = chunkdata['node'] |
2110 p1 = chunkdata['p1'] |
2107 p1 = chunkdata['p1'] |
2111 p2 = chunkdata['p2'] |
2108 p2 = chunkdata['p2'] |
2112 cs = chunkdata['cs'] |
2109 cs = chunkdata['cs'] |
2113 deltabase = chunkdata['deltabase'] |
2110 deltabase = chunkdata['deltabase'] |
2119 |
2116 |
2120 chunkdata = gen.changelogheader() |
2117 chunkdata = gen.changelogheader() |
2121 showchunks("changelog") |
2118 showchunks("changelog") |
2122 chunkdata = gen.manifestheader() |
2119 chunkdata = gen.manifestheader() |
2123 showchunks("manifest") |
2120 showchunks("manifest") |
2124 while True: |
2121 for chunkdata in iter(gen.filelogheader, {}): |
2125 chunkdata = gen.filelogheader() |
|
2126 if not chunkdata: |
|
2127 break |
|
2128 fname = chunkdata['filename'] |
2122 fname = chunkdata['filename'] |
2129 showchunks(fname) |
2123 showchunks(fname) |
2130 else: |
2124 else: |
2131 if isinstance(gen, bundle2.unbundle20): |
2125 if isinstance(gen, bundle2.unbundle20): |
2132 raise error.Abort(_('use debugbundle2 for this file')) |
2126 raise error.Abort(_('use debugbundle2 for this file')) |
2133 chunkdata = gen.changelogheader() |
2127 chunkdata = gen.changelogheader() |
2134 chain = None |
2128 chain = None |
2135 while True: |
2129 for chunkdata in iter(lambda: gen.deltachunk(chain), {}): |
2136 chunkdata = gen.deltachunk(chain) |
|
2137 if not chunkdata: |
|
2138 break |
|
2139 node = chunkdata['node'] |
2130 node = chunkdata['node'] |
2140 ui.write("%s%s\n" % (indent_string, hex(node))) |
2131 ui.write("%s%s\n" % (indent_string, hex(node))) |
2141 chain = node |
2132 chain = node |
2142 |
2133 |
2143 def _debugbundle2(ui, gen, all=None, **opts): |
2134 def _debugbundle2(ui, gen, all=None, **opts): |