comparison mercurial/debugcommands.py @ 35465:3bb1a647ab42

debug: remove an 'if ui.debug()' that is not doing anything ui.debug() does not return a value. Differential Revision: https://phab.mercurial-scm.org/D1719
author Kyle Lippincott <spectral@google.com>
date Mon, 18 Dec 2017 17:33:08 -0800
parents 786289423e97
children f1c54d003327
comparison
equal deleted inserted replaced
35464:6915f6a40283 35465:3bb1a647ab42
2305 """ 2305 """
2306 # passed to successorssets caching computation from one call to another 2306 # passed to successorssets caching computation from one call to another
2307 cache = {} 2307 cache = {}
2308 ctx2str = str 2308 ctx2str = str
2309 node2str = short 2309 node2str = short
2310 if ui.debug():
2311 def ctx2str(ctx):
2312 return ctx.hex()
2313 node2str = hex
2314 for rev in scmutil.revrange(repo, revs): 2310 for rev in scmutil.revrange(repo, revs):
2315 ctx = repo[rev] 2311 ctx = repo[rev]
2316 ui.write('%s\n'% ctx2str(ctx)) 2312 ui.write('%s\n'% ctx2str(ctx))
2317 for succsset in obsutil.successorssets(repo, ctx.node(), 2313 for succsset in obsutil.successorssets(repo, ctx.node(),
2318 closest=opts[r'closest'], 2314 closest=opts[r'closest'],