# HG changeset patch # User Patrick Mezard # Date 2011-03-23 22:33:14 # Node ID cede00420e1e3456d1413ca64ab33ff74a4a8b3a # Parent d80b768545cba3e7831fec266c2fc996139228f5 code indentation fixes diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1234,39 +1234,39 @@ def debugbundle(ui, bundlepath, all=None """lists the contents of a bundle""" f = url.open(ui, bundlepath) try: - gen = changegroup.readbundle(f, bundlepath) - if all: - ui.write("format: id, p1, p2, cset, len(delta)\n") - - def showchunks(named): - ui.write("\n%s\n" % named) - while 1: - chunkdata = gen.parsechunk() - if not chunkdata: - break - node = chunkdata['node'] - p1 = chunkdata['p1'] - p2 = chunkdata['p2'] - cs = chunkdata['cs'] - delta = chunkdata['data'] - ui.write("%s %s %s %s %s\n" % - (hex(node), hex(p1), hex(p2), - hex(cs), len(delta))) - - showchunks("changelog") - showchunks("manifest") - while 1: - fname = gen.chunk() - if not fname: - break - showchunks(fname) - else: + gen = changegroup.readbundle(f, bundlepath) + if all: + ui.write("format: id, p1, p2, cset, len(delta)\n") + + def showchunks(named): + ui.write("\n%s\n" % named) while 1: chunkdata = gen.parsechunk() if not chunkdata: break node = chunkdata['node'] - ui.write("%s\n" % hex(node)) + p1 = chunkdata['p1'] + p2 = chunkdata['p2'] + cs = chunkdata['cs'] + delta = chunkdata['data'] + ui.write("%s %s %s %s %s\n" % + (hex(node), hex(p1), hex(p2), + hex(cs), len(delta))) + + showchunks("changelog") + showchunks("manifest") + while 1: + fname = gen.chunk() + if not fname: + break + showchunks(fname) + else: + while 1: + chunkdata = gen.parsechunk() + if not chunkdata: + break + node = chunkdata['node'] + ui.write("%s\n" % hex(node)) finally: f.close() diff --git a/mercurial/repair.py b/mercurial/repair.py --- a/mercurial/repair.py +++ b/mercurial/repair.py @@ -46,7 +46,7 @@ def _collectbrokencsets(repo, files, str # less than striprev (those will be broken by strip) for lrev in links: if lrev < striprev: - s.add(lrev) + s.add(lrev) collectone(repo.manifest) for fname in files: