Page MenuHomePhabricator

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

Authored by martinvonz on Thu, Jun 25, 3:24 PM.



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.

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Thu, Jun 25, 3:24 PM
durin42 accepted this revision as: durin42.Thu, Jun 25, 3:34 PM
durin42 added a subscriber: durin42.

My feelings on this are "obviously yes" but I thought that so quickly I lack confidence that I'm not missing something. :)

pulkit accepted this revision.Mon, Jun 29, 4:40 AM
This revision is now accepted and ready to land.Mon, Jun 29, 4:40 AM