diff -r 5243890224ff -r 0b57b77f9b3e mercurial/bookmarks.py --- a/mercurial/bookmarks.py Thu Aug 13 19:37:47 2015 -0500 +++ b/mercurial/bookmarks.py Sat Aug 01 05:43:39 2015 -0700 @@ -90,6 +90,11 @@ can be copied back on rollback. ''' repo = self._repo + if (repo.ui.configbool('devel', 'all-warnings') + or repo.ui.configbool('devel', 'check-locks')): + l = repo._wlockref and repo._wlockref() + if l is None or not l.held: + repo.ui.develwarn('bookmarks write with no wlock') self._writerepo(repo) repo.invalidatevolatilesets()