annotate: respect ui.relative-paths for "binary file" message
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 08 Feb 2019 13:31:26 -0800
changeset 41635 446e1dcc3b5c
parent 41634 62bf34f70fe8
child 41636 be8741d42836
annotate: respect ui.relative-paths for "binary file" message Differential Revision: https://phab.mercurial-scm.org/D5917
mercurial/commands.py
--- a/mercurial/commands.py	Fri Feb 08 23:29:07 2019 -0800
+++ b/mercurial/commands.py	Fri Feb 08 13:31:26 2019 -0800
@@ -407,12 +407,13 @@
     if skiprevs:
         skiprevs = scmutil.revrange(repo, skiprevs)
 
+    uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
     for abs in ctx.walk(m):
         fctx = ctx[abs]
         rootfm.startitem()
         rootfm.data(path=abs)
         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
 
         fm = rootfm.nested('lines', tmpl='{rev}: {line}')