diff hggit/git_handler.py @ 935:674f799afb04

update_hg_bookmarks: add wlock
author Sean Farley <sean@farley.io>
date Thu, 24 Sep 2015 16:24:27 -0700 (2015-09-24)
parents 7b89630a2a48
children 988d84cc5565
line wrap: on
line diff
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -1299,7 +1299,11 @@
                         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'