Show More
@@ -19,6 +19,7 b' from mercurial import (' | |||
|
19 | 19 | cmdutil, |
|
20 | 20 | encoding, |
|
21 | 21 | patch, |
|
22 | pycompat, | |
|
22 | 23 | registrar, |
|
23 | 24 | scmutil, |
|
24 | 25 | util, |
@@ -45,6 +46,7 b' def changedlines(ui, repo, ctx1, ctx2, f' | |||
|
45 | 46 | |
|
46 | 47 | def countrate(ui, repo, amap, *pats, **opts): |
|
47 | 48 | """Calculate stats""" |
|
49 | opts = pycompat.byteskwargs(opts) | |
|
48 | 50 | if opts.get('dateformat'): |
|
49 | 51 | def getkey(ctx): |
|
50 | 52 | t, tz = ctx.date() |
@@ -154,7 +156,7 b' def churn(ui, repo, *pats, **opts):' | |||
|
154 | 156 | return s + " " * (l - encoding.colwidth(s)) |
|
155 | 157 | |
|
156 | 158 | amap = {} |
|
157 | aliases = opts.get('aliases') | |
|
159 | aliases = opts.get(r'aliases') | |
|
158 | 160 | if not aliases and os.path.exists(repo.wjoin('.hgchurn')): |
|
159 | 161 | aliases = repo.wjoin('.hgchurn') |
|
160 | 162 | if aliases: |
@@ -172,7 +174,7 b' def churn(ui, repo, *pats, **opts):' | |||
|
172 | 174 | if not rate: |
|
173 | 175 | return |
|
174 | 176 | |
|
175 | if opts.get('sort'): | |
|
177 | if opts.get(r'sort'): | |
|
176 | 178 | rate.sort() |
|
177 | 179 | else: |
|
178 | 180 | rate.sort(key=lambda x: (-sum(x[1]), x)) |
@@ -185,7 +187,7 b' def churn(ui, repo, *pats, **opts):' | |||
|
185 | 187 | ui.debug("assuming %i character terminal\n" % ttywidth) |
|
186 | 188 | width = ttywidth - maxname - 2 - 2 - 2 |
|
187 | 189 | |
|
188 | if opts.get('diffstat'): | |
|
190 | if opts.get(r'diffstat'): | |
|
189 | 191 | width -= 15 |
|
190 | 192 | def format(name, diffstat): |
|
191 | 193 | added, removed = diffstat |
General Comments 0
You need to be logged in to leave comments.
Login now