Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 41646:446e1dcc3b5c
annotate: respect ui.relative-paths for "binary file" message
Differential Revision: https://phab.mercurial-scm.org/D5917
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 08 Feb 2019 13:31:26 -0800 |
parents | eeab8c1c926b |
children | f8b18583049f |
comparison
equal
deleted
inserted
replaced
41645:62bf34f70fe8 | 41646:446e1dcc3b5c |
---|---|
405 whitespace=True) | 405 whitespace=True) |
406 skiprevs = opts.get('skip') | 406 skiprevs = opts.get('skip') |
407 if skiprevs: | 407 if skiprevs: |
408 skiprevs = scmutil.revrange(repo, skiprevs) | 408 skiprevs = scmutil.revrange(repo, skiprevs) |
409 | 409 |
410 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) | |
410 for abs in ctx.walk(m): | 411 for abs in ctx.walk(m): |
411 fctx = ctx[abs] | 412 fctx = ctx[abs] |
412 rootfm.startitem() | 413 rootfm.startitem() |
413 rootfm.data(path=abs) | 414 rootfm.data(path=abs) |
414 if not opts.get('text') and fctx.isbinary(): | 415 if not opts.get('text') and fctx.isbinary(): |
415 rootfm.plain(_("%s: binary file\n") % m.rel(abs)) | 416 rootfm.plain(_("%s: binary file\n") % uipathfn(abs)) |
416 continue | 417 continue |
417 | 418 |
418 fm = rootfm.nested('lines', tmpl='{rev}: {line}') | 419 fm = rootfm.nested('lines', tmpl='{rev}: {line}') |
419 lines = fctx.annotate(follow=follow, skiprevs=skiprevs, | 420 lines = fctx.annotate(follow=follow, skiprevs=skiprevs, |
420 diffopts=diffopts) | 421 diffopts=diffopts) |