amend: handle crash before transaction initialization with --patch stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 21 Sep 2018 11:58:42 +0200
branchstable
changeset 4121 7f18c7e1e744
parent 4119 c4b891fe44c3
child 4123 119fced5a891
amend: handle crash before transaction initialization with --patch The `tr` object can be None.
hgext3rd/evolve/cmdrewrite.py
--- a/hgext3rd/evolve/cmdrewrite.py	Mon Sep 17 09:25:28 2018 -0700
+++ b/hgext3rd/evolve/cmdrewrite.py	Fri Sep 21 11:58:42 2018 +0200
@@ -182,7 +182,8 @@
         bookmarkupdater(newnode)
         tr.close()
     finally:
-        tr.release()
+        if tr is not None:
+            tr.release()
         lockmod.release(lock, wlock)
 
 def _editandapply(ui, repo, pats, old, p1, fp, diffopts):