dirstate: make sure we read the dirstate before setting parents
authorMatt Mackall <mpm@selenic.com>
Tue, 18 Oct 2005 00:43:19 -0700
changeset 1394 b20b683e8d95
parent 1393 67779d34cb52
child 1395 c2eb204917f8
dirstate: make sure we read the dirstate before setting parents
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Sat Oct 15 15:49:05 2005 -0700
+++ b/mercurial/dirstate.py	Tue Oct 18 00:43:19 2005 -0700
@@ -117,6 +117,8 @@
             self.dirty = 1
 
     def setparents(self, p1, p2=nullid):
+        if not self.pl:
+            self.read()
         self.markdirty()
         self.pl = p1, p2