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