comparison mercurial/scmutil.py @ 41665:0ed7a8ac5711

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
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 08 Feb 2019 13:33:40 -0800
parents 0a5a6675c86c
children a950b65cbe1b
comparison
equal deleted inserted replaced
41664:0cbf491db7ee 41665:0ed7a8ac5711
800 if opts is None: 800 if opts is None:
801 opts = {} 801 opts = {}
802 if not globbed and default == 'relpath': 802 if not globbed and default == 'relpath':
803 pats = expandpats(pats or []) 803 pats = expandpats(pats or [])
804 804
805 uipathfn = getuipathfn(ctx.repo(), legacyrelativevalue=True)
805 def bad(f, msg): 806 def bad(f, msg):
806 ctx.repo().ui.warn("%s: %s\n" % (m.rel(f), msg)) 807 ctx.repo().ui.warn("%s: %s\n" % (uipathfn(f), msg))
807 808
808 if badfn is None: 809 if badfn is None:
809 badfn = bad 810 badfn = bad
810 811
811 m = ctx.match(pats, opts.get('include'), opts.get('exclude'), 812 m = ctx.match(pats, opts.get('include'), opts.get('exclude'),