Patchwork [9,of,9] repair: remove unnecessary locking for bookmarks

login
register
mail settings
Submitter via Mercurial-devel
Date June 19, 2017, 8:48 p.m.
Message ID <56a750a6da9028f7f35b.1497905281@martinvonz.svl.corp.google.com>
Download mbox | patch
Permalink /patch/21515/
State Accepted
Headers show

Comments

via Mercurial-devel - June 19, 2017, 8:48 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1497896689 25200
#      Mon Jun 19 11:24:49 2017 -0700
# Node ID 56a750a6da9028f7f35bfdf803893b0de34072be
# Parent  f3febdbec4cbfb75deca3ed73525f573d9566f13
repair: remove unnecessary locking for bookmarks

The caller has already locked the repo.

Patch

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -216,9 +216,8 @@ 
         for m in updatebm:
             bm[m] = repo[newbmtarget].node()
 
-        with repo.lock():
-            with repo.transaction('repair') as tr:
-                bm.recordchange(tr)
+        with repo.transaction('repair') as tr:
+            bm.recordchange(tr)
 
         # remove undo files
         for undovfs, undofile in repo.undofiles():