This is an archive of the discontinued Mercurial Phabricator instance.

infinitepush: put metadata fill in wlock
ClosedPublic

Authored by durham on Jul 17 2017, 6:17 AM.
Tags
None
Subscribers

Details

Reviewers
stash
Group Reviewers
Restricted Project
Commits
rFBHGXdadd9cc0a957: infinitepush: put metadata fill in wlock
Summary

Upstream has added warnings when writing files outside the wlock, so let's put
this write in the wlock.

Test Plan

The tests now pass

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

durham created this revision.Jul 17 2017, 6:17 AM
simonfar added inline comments.
infinitepush/infinitepushcommands.py
95 ↗(On Diff #191)

It's not immediately obvious why with index: on its own doesn't take wlock. After all, this is a recursive lock.

durham updated this revision to Diff 192.Jul 17 2017, 6:49 AM

Switch to taking the lock internally

stash accepted this revision.Jul 17 2017, 7:01 AM
stash added a subscriber: stash.

fileindexapi is used only in tests, so any solution should work

This revision is now accepted and ready to land.Jul 17 2017, 7:01 AM
This revision was automatically updated to reflect the committed changes.