diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -128,6 +128,7 @@ class localrepository(repo.repository): if not path.startswith(self.root): return False subpath = path[len(self.root) + 1:] + normsubpath = util.pconvert(subpath) # XXX: Checking against the current working copy is wrong in # the sense that it can reject things like @@ -149,9 +150,9 @@ class localrepository(repo.repository): ctx = self[None] parts = util.splitpath(subpath) while parts: - prefix = os.sep.join(parts) + prefix = '/'.join(parts) if prefix in ctx.substate: - if prefix == subpath: + if prefix == normsubpath: return True else: sub = ctx.sub(prefix) diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -85,6 +85,7 @@ class pathauditor(object): '''Check the relative path. path may contain a pattern (e.g. foodir/**.txt)''' + path = util.localpath(path) normpath = self.normcase(path) if normpath in self.audited: return diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -92,7 +92,7 @@ def state(ctx, ui): src = remapped src = remap(src) - state[path] = (src.strip(), rev.get(path, ''), kind) + state[util.pconvert(path)] = (src.strip(), rev.get(path, ''), kind) return state