transplant: clobber old series when transplant fails
authorBrendan Cully <brendan@kublai.com>
Fri, 01 Dec 2006 14:30:17 -0800
changeset 3757 faed44bab17b
parent 3756 2f2b59fcb394
child 3758 889f7e74a0d9
transplant: clobber old series when transplant fails
hgext/transplant.py
--- a/hgext/transplant.py	Fri Dec 01 23:28:14 2006 +0100
+++ b/hgext/transplant.py	Fri Dec 01 14:30:17 2006 -0800
@@ -209,6 +209,9 @@
             except Exception, inst:
                 if filter:
                     os.unlink(patchfile)
+                seriespath = os.path.join(self.path, 'series')
+                if os.path.exists(seriespath):
+                    os.unlink(seriespath)
                 p1 = repo.dirstate.parents()[0]
                 p2 = node
                 self.log(user, date, message, p1, p2, merge=merge)