comparison mercurial/hg.py @ 314:3402cb9a4c06

More tweaking to rawcommit for repo conversion -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 More tweaking to rawcommit for repo conversion manifest hash: 912e7d61fc15845fd24baada9f553c2d38b26f06 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCrGdBywK+sNU5EO8RApbrAKCPVvxnSgkzAWpwc6uRDCCYAsqO7QCeMonn tZS4URbMI2aDQYw15wDEZHg= =C2Vn -----END PGP SIGNATURE-----
author mpm@selenic.com
date Sun, 12 Jun 2005 08:48:01 -0800
parents e75ea4662d81
children b18ce742566a
comparison
equal deleted inserted replaced
313:e75ea4662d81 314:3402cb9a4c06
437 437
438 tr = self.transaction() 438 tr = self.transaction()
439 mm = m1.copy() 439 mm = m1.copy()
440 mfm = mf1.copy() 440 mfm = mf1.copy()
441 linkrev = self.changelog.count() 441 linkrev = self.changelog.count()
442 self.dirstate.setparents(p1, p2)
442 for f in files: 443 for f in files:
443 try: 444 try:
444 t = self.wfile(f).read() 445 t = self.wfile(f).read()
445 tm = is_exec(self.wjoin(f)) 446 tm = is_exec(self.wjoin(f))
446 r = self.file(f) 447 r = self.file(f)
447 mfm[f] = tm 448 mfm[f] = tm
448 mm[f] = r.add(t, tr, linkrev, 449 mm[f] = r.add(t, tr, linkrev,
449 m1.get(f, nullid), m2.get(f, nullid)) 450 m1.get(f, nullid), m2.get(f, nullid))
451 self.dirstate.update([f], "n")
450 except IOError: 452 except IOError:
451 del mm[f] 453 try:
452 del mfm[f] 454 del mm[f]
455 del mfm[f]
456 self.dirstate.forget([f])
457 except:
458 # deleted from p2?
459 pass
453 460
454 mnode = self.manifest.add(mm, mfm, tr, linkrev, c1[0], c2[0]) 461 mnode = self.manifest.add(mm, mfm, tr, linkrev, c1[0], c2[0])
455 n = self.changelog.add(mnode, files, text, tr, p1, p2, user, date) 462 n = self.changelog.add(mnode, files, text, tr, p1, p2, user, date)
456 tr.close() 463 tr.close()
457 self.dirstate.setparents(p1, p2)
458 self.dirstate.clear()
459 self.dirstate.update(files, "n")
460 464
461 def commit(self, files = None, text = ""): 465 def commit(self, files = None, text = ""):
462 commit = [] 466 commit = []
463 remove = [] 467 remove = []
464 if files: 468 if files: