From 12c6012084e23b51be49fb3f92f58cb327c0d2c9 Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Thu, 24 Sep 2015 16:24:27 -0700 Subject: [PATCH] update_hg_bookmarks: add wlock --- hggit/git_handler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hggit/git_handler.py b/hggit/git_handler.py index d777f56034..311763b8ff 100644 --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -1299,7 +1299,11 @@ class GitHandler(object): bms[head + suffix] = hgsha if heads: - bms.write() + wlock = self.repo.wlock() + try: + bms.write() + finally: + wlock.release() except AttributeError: self.ui.warn(_('creating bookmarks failed, do you have'