changeset 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 67779d34cb52
children c2eb204917f8
files mercurial/dirstate.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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