diff -r df55ce6854c3 -r 73e1ab39792c mercurial/store.py --- a/mercurial/store.py Fri Oct 12 10:52:32 2012 +0200 +++ b/mercurial/store.py Fri Oct 12 10:52:33 2012 +0200 @@ -527,13 +527,14 @@ '''Checks if the store contains path''' path = "/".join(("data", path)) # check for files (exact match) - if path + '.i' in self.fncache: + e = path + '.i' + if e in self.fncache and self._exists(e): return True # now check for directories (prefix match) if not path.endswith('/'): path += '/' for e in self.fncache: - if e.startswith(path): + if e.startswith(path) and self._exists(e): return True return False