Mercurial > hg-stable
changeset 8639:1323dddf8078
lookup: check for dirstate damage on failure
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 25 May 2009 10:44:37 -0500 |
parents | c6483eec6092 |
children | 8536119f2f94 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)