Mercurial > hg
comparison mercurial/commands.py @ 7094:a4769dec7773
annotate: fix bug when annotating multiple files
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 12 Oct 2008 19:21:07 -0500 |
parents | f29b674cc221 |
children | 4a1ac535be1d |
comparison
equal
deleted
inserted
replaced
7093:16bafcebd3d1 | 7094:a4769dec7773 |
---|---|
121 pieces = [] | 121 pieces = [] |
122 | 122 |
123 for f in funcmap: | 123 for f in funcmap: |
124 l = [f(n) for n, dummy in lines] | 124 l = [f(n) for n, dummy in lines] |
125 if l: | 125 if l: |
126 m = max(map(len, l)) | 126 ml = max(map(len, l)) |
127 pieces.append(["%*s" % (m, x) for x in l]) | 127 pieces.append(["%*s" % (ml, x) for x in l]) |
128 | 128 |
129 if pieces: | 129 if pieces: |
130 for p, l in zip(zip(*pieces), lines): | 130 for p, l in zip(zip(*pieces), lines): |
131 ui.write("%s: %s" % (" ".join(p), l[1])) | 131 ui.write("%s: %s" % (" ".join(p), l[1])) |
132 | 132 |