diff -r 413c179cf7d5 -r 5245bac09e6a mercurial/manifest.py --- a/mercurial/manifest.py Sun Feb 18 00:49:11 2018 -0500 +++ b/mercurial/manifest.py Sun Feb 18 00:49:29 2018 -0500 @@ -1019,7 +1019,7 @@ # yield this dir's files and walk its submanifests self._load() - for p in sorted(self._dirs.keys() + self._files.keys()): + for p in sorted(list(self._dirs) + list(self._files)): if p in self._files: fullp = self._subpath(p) if match(fullp):