HomePhabricator

locks: expect repo lock, not wlock, when writing to .hg/strip-backup/

Authored by martinvonz.

Description

locks: expect repo lock, not wlock, when writing to .hg/strip-backup/

There should be no need for a working copy lock when creating (or
reading) bundles in .hg/strip-backup/ since they don't affect the
working copy.

I noticed this because we have an extension that tries to strip some
revisions while holding only a repo lock. I guess we have no such
cases in core, which seems a bit surprising. Maybe we always take a
wlock at a higher level so the working copy is not updated while the
target commit is being stripped.

Differential Revision: https://phab.mercurial-scm.org/D8666