Show More
@@ -1234,39 +1234,39 b' def debugbundle(ui, bundlepath, all=None' | |||
|
1234 | 1234 | """lists the contents of a bundle""" |
|
1235 | 1235 | f = url.open(ui, bundlepath) |
|
1236 | 1236 | try: |
|
1237 |
|
|
|
1238 |
|
|
|
1239 |
|
|
|
1240 | ||
|
1241 |
|
|
|
1242 |
|
|
|
1243 | while 1: | |
|
1244 | chunkdata = gen.parsechunk() | |
|
1245 | if not chunkdata: | |
|
1246 | break | |
|
1247 | node = chunkdata['node'] | |
|
1248 | p1 = chunkdata['p1'] | |
|
1249 | p2 = chunkdata['p2'] | |
|
1250 | cs = chunkdata['cs'] | |
|
1251 | delta = chunkdata['data'] | |
|
1252 | ui.write("%s %s %s %s %s\n" % | |
|
1253 | (hex(node), hex(p1), hex(p2), | |
|
1254 | hex(cs), len(delta))) | |
|
1255 | ||
|
1256 | showchunks("changelog") | |
|
1257 | showchunks("manifest") | |
|
1258 | while 1: | |
|
1259 | fname = gen.chunk() | |
|
1260 | if not fname: | |
|
1261 | break | |
|
1262 | showchunks(fname) | |
|
1263 | else: | |
|
1237 | gen = changegroup.readbundle(f, bundlepath) | |
|
1238 | if all: | |
|
1239 | ui.write("format: id, p1, p2, cset, len(delta)\n") | |
|
1240 | ||
|
1241 | def showchunks(named): | |
|
1242 | ui.write("\n%s\n" % named) | |
|
1264 | 1243 | while 1: |
|
1265 | 1244 | chunkdata = gen.parsechunk() |
|
1266 | 1245 | if not chunkdata: |
|
1267 | 1246 | break |
|
1268 | 1247 | node = chunkdata['node'] |
|
1269 | ui.write("%s\n" % hex(node)) | |
|
1248 | p1 = chunkdata['p1'] | |
|
1249 | p2 = chunkdata['p2'] | |
|
1250 | cs = chunkdata['cs'] | |
|
1251 | delta = chunkdata['data'] | |
|
1252 | ui.write("%s %s %s %s %s\n" % | |
|
1253 | (hex(node), hex(p1), hex(p2), | |
|
1254 | hex(cs), len(delta))) | |
|
1255 | ||
|
1256 | showchunks("changelog") | |
|
1257 | showchunks("manifest") | |
|
1258 | while 1: | |
|
1259 | fname = gen.chunk() | |
|
1260 | if not fname: | |
|
1261 | break | |
|
1262 | showchunks(fname) | |
|
1263 | else: | |
|
1264 | while 1: | |
|
1265 | chunkdata = gen.parsechunk() | |
|
1266 | if not chunkdata: | |
|
1267 | break | |
|
1268 | node = chunkdata['node'] | |
|
1269 | ui.write("%s\n" % hex(node)) | |
|
1270 | 1270 | finally: |
|
1271 | 1271 | f.close() |
|
1272 | 1272 |
General Comments 0
You need to be logged in to leave comments.
Login now