# HG changeset patch # User Matt Mackall # Date 2005-10-18 07:43:19 # Node ID b20b683e8d9585f9757e02fea99046e5d4c642f3 # Parent 67779d34cb52710b29afb548305e08b2cee90ee7 dirstate: make sure we read the dirstate before setting parents diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -117,6 +117,8 @@ class dirstate: self.dirty = 1 def setparents(self, p1, p2=nullid): + if not self.pl: + self.read() self.markdirty() self.pl = p1, p2