# HG changeset patch # User Matt Mackall # Date 1131406824 28800 # Node ID 46a07392cf28ac38bc22e78cc7b764007e337b07 # Parent b254243b71595549519a558b1e134a6312235480 Add safety check for addgroup diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -784,6 +784,10 @@ class revlog: continue delta = chunk[80:] + for p in (p1, p2): + if not p in self.nodemap: + raise RevlogError(_("unknown parent %s") % short(p1)) + if not chain: # retrieve the parent revision of the delta chain chain = p1