# HG changeset patch # User Martin von Zweigbergk # Date 1549661620 28800 # Node ID 0ed7a8ac5711e5c3243546c3aefe009a82a2da91 # Parent 0cbf491db7eedc0eae87a55c3fb81a09e8d123cc 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 diff -r 0cbf491db7ee -r 0ed7a8ac5711 mercurial/scmutil.py --- 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