match: normalize `cwd` early
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 13 Dec 2019 10:31:00 -0800
changeset 43950 5685ce2ea3bf
parent 43949 8b1a9ba375e5
child 43951 1ccf340acf14
match: normalize `cwd` early By having cwd in absolute form, we won't have to adjust it when passing it to subrepo matchers. This will matter for a coming patch. Differential Revision: https://phab.mercurial-scm.org/D7650
mercurial/match.py
--- a/mercurial/match.py	Fri Dec 13 11:21:31 2019 -0800
+++ b/mercurial/match.py	Fri Dec 13 10:31:00 2019 -0800
@@ -229,6 +229,7 @@
     False
     """
     assert os.path.isabs(root)
+    cwd = util.normpath(os.path.join(root, cwd))
     normalize = _donormalize
     if icasefs:
         dirstate = ctx.repo().dirstate