diff -r cfe66dcf45c0 -r bb77654dc7ae mercurial/subrepo.py --- a/mercurial/subrepo.py Sat Dec 17 20:02:50 2016 +0530 +++ b/mercurial/subrepo.py Sat Dec 17 20:14:24 2016 +0530 @@ -31,6 +31,7 @@ node, pathutil, phases, + pycompat, scmutil, util, ) @@ -1172,7 +1173,7 @@ changes.append(path) for path in changes: for ext in externals: - if path == ext or path.startswith(ext + os.sep): + if path == ext or path.startswith(ext + pycompat.ossep): return True, True, bool(missing) return bool(changes), False, bool(missing)