Mercurial > hg
comparison mercurial/commands.py @ 1309:332f225b835c
Make debugwalk strip trailing spaces and remove these from test-walk.out
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 21 Sep 2005 08:07:38 +0200 |
parents | 1546c2aa6b30 |
children | c9cf171f30dd |
comparison
equal
deleted
inserted
replaced
1308:2073e5a71008 | 1309:332f225b835c |
---|---|
900 def debugwalk(ui, repo, *pats, **opts): | 900 def debugwalk(ui, repo, *pats, **opts): |
901 """show how files match on given patterns""" | 901 """show how files match on given patterns""" |
902 items = list(walk(repo, pats, opts)) | 902 items = list(walk(repo, pats, opts)) |
903 if not items: | 903 if not items: |
904 return | 904 return |
905 fmt = '%%s %%-%ds %%-%ds %%s\n' % ( | 905 fmt = '%%s %%-%ds %%-%ds %%s' % ( |
906 max([len(abs) for (src, abs, rel, exact) in items]), | 906 max([len(abs) for (src, abs, rel, exact) in items]), |
907 max([len(rel) for (src, abs, rel, exact) in items])) | 907 max([len(rel) for (src, abs, rel, exact) in items])) |
908 for src, abs, rel, exact in items: | 908 for src, abs, rel, exact in items: |
909 ui.write(fmt % (src, abs, rel, exact and 'exact' or '')) | 909 line = fmt % (src, abs, rel, exact and 'exact' or '') |
910 ui.write("%s\n" % line.rstrip()) | |
910 | 911 |
911 def diff(ui, repo, *pats, **opts): | 912 def diff(ui, repo, *pats, **opts): |
912 """diff working directory (or selected files)""" | 913 """diff working directory (or selected files)""" |
913 node1, node2 = None, None | 914 node1, node2 = None, None |
914 revs = [repo.lookup(x) for x in opts['rev']] | 915 revs = [repo.lookup(x) for x in opts['rev']] |