scmutil: respect ui.relative-paths in default match.badfn
We should probably be passing in a uipathfn here instead, so the
caller can get consistent output (between match.badfn and whatever
else it prints). I think we should ideally remove the badfn from the
matcher completely, but that's a different story. This patch is at
least not making it worse.
Differential Revision: https://phab.mercurial-scm.org/D5916
--- a/mercurial/scmutil.py Fri Feb 08 13:00:28 2019 -0800
+++ b/mercurial/scmutil.py Fri Feb 08 13:33:40 2019 -0800
@@ -802,8 +802,9 @@
if not globbed and default == 'relpath':
pats = expandpats(pats or [])
+ uipathfn = getuipathfn(ctx.repo(), legacyrelativevalue=True)
def bad(f, msg):
- ctx.repo().ui.warn("%s: %s\n" % (m.rel(f), msg))
+ ctx.repo().ui.warn("%s: %s\n" % (uipathfn(f), msg))
if badfn is None:
badfn = bad