diff -r 799e156785f7 -r f8b18583049f mercurial/scmutil.py --- a/mercurial/scmutil.py Fri Feb 08 10:32:48 2019 -0800 +++ b/mercurial/scmutil.py Thu Feb 07 11:15:30 2019 -0800 @@ -11,6 +11,7 @@ import glob import hashlib import os +import posixpath import re import subprocess import weakref @@ -758,6 +759,10 @@ else: return lambda f: f +def subdiruipathfn(subpath, uipathfn): + '''Create a new uipathfn that treats the file as relative to subpath.''' + return lambda f: uipathfn(posixpath.join(subpath, f)) + def expandpats(pats): '''Expand bare globs when running on windows. On posix we assume it already has already been done by sh.'''