##// END OF EJS Templates
Use ui.write instead of print in debugwalk.
Bryan O'Sullivan -
r1058:40227997 default
parent child Browse files
Show More
@@ -716,12 +716,12 b' def debugindexdot(ui, file_):'
716 716 def debugwalk(ui, repo, *pats, **opts):
717 717 items = list(walk(repo, pats, opts))
718 718 if not items: return
719 fmt = '%%s %%-%ds %%-%ds %%s' % (
719 fmt = '%%s %%-%ds %%-%ds %%s\n' % (
720 720 max([len(abs) for (src, abs, rel, exact) in items]),
721 721 max([len(rel) for (src, abs, rel, exact) in items]))
722 722 exactly = {True: 'exact', False: ''}
723 723 for src, abs, rel, exact in items:
724 print fmt % (src, abs, rel, exactly[exact])
724 ui.write(fmt % (src, abs, rel, exactly[exact]))
725 725
726 726 def diff(ui, repo, *pats, **opts):
727 727 """diff working directory (or selected files)"""
@@ -806,6 +806,7 b' def grep(ui, repo, pattern = None, *pats'
806 806 return fcache[fn]
807 807
808 808 def matchlines(body):
809 # massively inefficient. rewrite.
809 810 for match in regexp.finditer(body):
810 811 start, end = match.span()
811 812 lnum = body.count('\n', 0, start) + 1
General Comments 0
You need to be logged in to leave comments. Login now