##// END OF EJS Templates
teach rawcommit about dirstate.parents()...
mpm@selenic.com -
r228:2502aa66 default
parent child Browse files
Show More
@@ -388,7 +388,8 b' class localrepository:'
388 388 raise inst
389 389
390 390 def rawcommit(self, files, text, user, date, p1=None, p2=None):
391 p1 = p1 or self.current or nullid
391 p1 = p1 or self.dirstate.parents()[0] or nullid
392 p2 = p2 or self.dirstate.parents()[1] or nullid
392 393 pchange = self.changelog.read(p1)
393 394 pmmap = self.manifest.read(pchange[0])
394 395 tr = self.transaction()
@@ -401,13 +402,14 b' class localrepository:'
401 402 self.ui.warn("Read file %s error, skipped\n" % f)
402 403 continue
403 404 r = self.file(f)
405 # FIXME - need to find both parents properly
404 406 prev = pmmap.get(f, nullid)
405 407 mmap[f] = r.add(t, tr, linkrev, prev)
406 408
407 409 mnode = self.manifest.add(mmap, tr, linkrev, pchange[0])
408 410 n = self.changelog.add(mnode, files, text, tr, p1, p2, user ,date, )
409 411 tr.close()
410 self.setcurrent(n)
412 self.dirstate.setparents(p1, p2)
411 413 self.dirstate.clear()
412 414 self.dirstate.update(mmap.keys(), "n")
413 415
General Comments 0
You need to be logged in to leave comments. Login now