mercurial/cmdutil.py
changeset 26578 8bd2759f1fa7
parent 26562 dd2f5e014806
child 26579 dc2b8c005697
--- a/mercurial/cmdutil.py	Fri Oct 09 03:53:46 2015 +0900
+++ b/mercurial/cmdutil.py	Fri Oct 09 03:53:46 2015 +0900
@@ -2507,10 +2507,9 @@
     base = old.p1()
     createmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt)
 
-    wlock = dsguard = lock = newid = None
+    wlock = lock = newid = None
     try:
         wlock = repo.wlock()
-        dsguard = dirstateguard(repo, 'amend')
         lock = repo.lock()
         tr = repo.transaction('amend')
         try:
@@ -2682,7 +2681,6 @@
             tr.close()
         finally:
             tr.release()
-        dsguard.close()
         if not createmarkers and newid != old.node():
             # Strip the intermediate commit (if there was one) and the amended
             # commit
@@ -2691,7 +2689,7 @@
             ui.note(_('stripping amended changeset %s\n') % old)
             repair.strip(ui, repo, old.node(), topic='amend-backup')
     finally:
-        lockmod.release(lock, dsguard, wlock)
+        lockmod.release(lock, wlock)
     return newid
 
 def commiteditor(repo, ctx, subs, editform=''):