# HG changeset patch # User Matt Mackall # Date 1243266277 18000 # Node ID 1323dddf80782ad945b264b5293606d3ca827fc1 # Parent c6483eec6092414bac04f916706f572ed2305ec0 lookup: check for dirstate damage on failure diff -r c6483eec6092 -r 1323dddf8078 mercurial/localrepo.py --- a/mercurial/localrepo.py Tue May 26 23:09:38 2009 +0200 +++ b/mercurial/localrepo.py Mon May 25 10:44:37 2009 -0500 @@ -474,6 +474,11 @@ n = self.changelog._partialmatch(key) if n: return n + + # can't find key, check if it might have come from damaged dirstate + if key in self.dirstate.parents(): + raise error.Abort(_("working directory has unknown parent '%s'!") + % short(key)) try: if len(key) == 20: key = hex(key)