hgext/transplant.py
changeset 26578 8bd2759f1fa7
parent 26346 2449a0a6ebda
child 26587 56b2bcea2529
--- a/hgext/transplant.py	Fri Oct 09 03:53:46 2015 +0900
+++ b/hgext/transplant.py	Fri Oct 09 03:53:46 2015 +0900
@@ -127,10 +127,9 @@
         diffopts = patch.difffeatureopts(self.ui, opts)
         diffopts.git = True
 
-        lock = wlock = tr = dsguard = None
+        lock = wlock = tr = None
         try:
             wlock = repo.wlock()
-            dsguard = cmdutil.dirstateguard(repo, 'transplant')
             lock = repo.lock()
             tr = repo.transaction('transplant')
             for rev in revs:
@@ -203,7 +202,6 @@
                             # Do not rollback, it is up to the user to
                             # fix the merge or cancel everything
                             tr.close()
-                            dsguard.close()
                             raise
                         if n and domerge:
                             self.ui.status(_('%s merged at %s\n') % (revstr,
@@ -216,7 +214,6 @@
                         if patchfile:
                             os.unlink(patchfile)
             tr.close()
-            dsguard.close()
             if pulls:
                 exchange.pull(repo, source.peer(), heads=pulls)
                 merge.update(repo, pulls[-1], False, False, None)
@@ -227,8 +224,6 @@
                 tr.release()
             if lock:
                 lock.release()
-            if dsguard:
-                dsguard.release()
             wlock.release()
 
     def filter(self, filter, node, changelog, patchfile):