changeset 37086:658b1d28813c

merge: pconvert paths in _unknowndirschecker before dirstate-normalizing This fixes the failure in test-pathconflicts-basic.t on Windows. The test was passing in 'a\b', which was getting normalized to 'A\B', which isn't in dirstate. (The filesystem path is all lowercase anyway.) This isn't the only case of calling dirstate.normalize(), but other methods here (util.finddirs()) seem to assume the input paths are already using '/'. I think the backslash comes from wvfs.reljoin() (in this case), but could also come from wvfs.walk(), so this is the only case that needs it.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 22 Mar 2018 22:56:29 -0400
parents 7ae6e3529e37
children e4640ec346ac
files mercurial/merge.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Thu Mar 22 22:39:43 2018 +0900
+++ b/mercurial/merge.py	Thu Mar 22 22:56:29 2018 -0400
@@ -706,7 +706,8 @@
             # Does the directory contain any files that are not in the dirstate?
             for p, dirs, files in repo.wvfs.walk(f):
                 for fn in files:
-                    relf = repo.dirstate.normalize(repo.wvfs.reljoin(p, fn))
+                    relf = util.pconvert(repo.wvfs.reljoin(p, fn))
+                    relf = repo.dirstate.normalize(relf)
                     if relf not in repo.dirstate:
                         return f
         return None