Commit 70064e3d authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

annotate: respect ui.relative-paths for "binary file" message

Differential Revision: https://phab.mercurial-scm.org/D5917
parent 62bf34f70fe8
...@@ -407,12 +407,13 @@ def annotate(ui, repo, *pats, **opts): ...@@ -407,12 +407,13 @@ def annotate(ui, repo, *pats, **opts):
if skiprevs: if skiprevs:
skiprevs = scmutil.revrange(repo, skiprevs) skiprevs = scmutil.revrange(repo, skiprevs)
uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
for abs in ctx.walk(m): for abs in ctx.walk(m):
fctx = ctx[abs] fctx = ctx[abs]
rootfm.startitem() rootfm.startitem()
rootfm.data(path=abs) rootfm.data(path=abs)
if not opts.get('text') and fctx.isbinary(): if not opts.get('text') and fctx.isbinary():
rootfm.plain(_("%s: binary file\n") % m.rel(abs)) rootfm.plain(_("%s: binary file\n") % uipathfn(abs))
continue continue
fm = rootfm.nested('lines', tmpl='{rev}: {line}') fm = rootfm.nested('lines', tmpl='{rev}: {line}')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment