comparison mercurial/commands.py @ 868:6a8a50bcc143

Fix debugwalk when there's nothing to walk.
author Bryan O'Sullivan <bos@serpentine.com>
date Sun, 07 Aug 2005 11:04:58 -0800
parents 9c918287d10b
children a82eae840447
comparison
equal deleted inserted replaced
839:9c918287d10b 868:6a8a50bcc143
579 ui.write("\t%d -> %d\n" % (r.rev(e[5]), i)) 579 ui.write("\t%d -> %d\n" % (r.rev(e[5]), i))
580 ui.write("}\n") 580 ui.write("}\n")
581 581
582 def debugwalk(ui, repo, *pats, **opts): 582 def debugwalk(ui, repo, *pats, **opts):
583 items = list(walk(repo, pats, opts)) 583 items = list(walk(repo, pats, opts))
584 if not items: return
584 fmt = '%%s %%-%ds %%s' % max([len(abs) for (src, abs, rel) in items]) 585 fmt = '%%s %%-%ds %%s' % max([len(abs) for (src, abs, rel) in items])
585 for i in items: print fmt % i 586 for i in items: print fmt % i
586 587
587 def diff(ui, repo, *pats, **opts): 588 def diff(ui, repo, *pats, **opts):
588 """diff working directory (or selected files)""" 589 """diff working directory (or selected files)"""