diff mercurial/dirstate.py @ 1394:b20b683e8d95

dirstate: make sure we read the dirstate before setting parents
author Matt Mackall <mpm@selenic.com>
date Tue, 18 Oct 2005 00:43:19 -0700
parents 32d8068b3e36
children 8c3e2a254257
line wrap: on
line diff
--- 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