Mercurial > hg > mercurial-source
diff mercurial/hg.py @ 30514:e93408080646
shared: take wlock for writting the 'shared' file
I do not see a reason why this should not be covered by the wlock.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Sun, 07 Aug 2016 17:10:47 +0200 (2016-08-07) |
parents | 3b4d69b3988d |
children | a77d48219edd |
line wrap: on
line diff
--- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -259,10 +259,11 @@ fp.write("default = %s\n" % default) fp.close() - if bookmarks: - fp = destrepo.vfs('shared', 'w') - fp.write(sharedbookmarks + '\n') - fp.close() + with destrepo.wlock(): + if bookmarks: + fp = destrepo.vfs('shared', 'w') + fp.write(sharedbookmarks + '\n') + fp.close() def _postshareupdate(repo, update, checkout=None): """Maybe perform a working directory update after a shared repo is created.