Mercurial > public > mercurial-scm > hg
diff mercurial/scmutil.py @ 41650:f8b18583049f
add: pass around uipathfn and use instead of m.rel() (API)
For now, the uipathfn we pass around always prints relative paths just
like before, so this should have no effect. Well, there's one little
change: I also made the "skipping missing subrepository: %s\n" message
relative.
Differential Revision: https://phab.mercurial-scm.org/D5901
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 07 Feb 2019 11:15:30 -0800 |
parents | 799e156785f7 |
children | 6a447a3d1bd0 |
line wrap: on
line diff
--- 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.'''