hgext/transplant.py
changeset 3758 889f7e74a0d9
parent 3757 faed44bab17b
child 3759 e96f97ca0358
--- a/hgext/transplant.py	Fri Dec 01 14:30:17 2006 -0800
+++ b/hgext/transplant.py	Fri Dec 01 15:00:33 2006 -0800
@@ -238,6 +238,7 @@
                                                            revlog.short(n)))
         seriespath = os.path.join(self.path, 'series')
         if not os.path.exists(seriespath):
+            self.transplants.write()
             return
         nodes, merges = self.readseries()
         revmap = {}
@@ -255,6 +256,7 @@
         if not user or not date or not message or not parents[0]:
             raise util.Abort(_('transplant log file is corrupt'))
 
+        extra = {'transplant_source': node}
         wlock = repo.wlock()
         p1, p2 = repo.dirstate.parents()
         if p1 != parents[0]:
@@ -262,7 +264,7 @@
                              revlog.hex(parents[0]))
         if merge:
             repo.dirstate.setparents(p1, parents[1])
-        n = repo.commit(None, message, user, date, wlock=wlock)
+        n = repo.commit(None, message, user, date, wlock=wlock, extra=extra)
         if not n:
             raise util.Abort(_('commit failed'))
         if not merge: