mercurial/localrepo.py
changeset 41361 092c5d05ba01
parent 41296 d82dd55024e7
child 41362 57c462db87fd
--- a/mercurial/localrepo.py	Thu Jan 17 22:07:58 2019 -0800
+++ b/mercurial/localrepo.py	Wed Jan 16 17:46:39 2019 -0800
@@ -2475,16 +2475,16 @@
                           parent2=hookp2)
                 tr = self.transaction('commit')
                 ret = self.commitctx(cctx, True)
+                # update bookmarks, dirstate and mergestate
+                bookmarks.update(self, [p1, p2], ret)
+                cctx.markcommitted(ret)
+                ms.reset()
+                tr.close()
             except: # re-raises
                 if edited:
                     self.ui.write(
                         _('note: commit message saved in %s\n') % msgfn)
                 raise
-            # update bookmarks, dirstate and mergestate
-            bookmarks.update(self, [p1, p2], ret)
-            cctx.markcommitted(ret)
-            ms.reset()
-            tr.close()
 
         finally:
             lockmod.release(tr, lock, wlock)