This is an archive of the discontinued Mercurial Phabricator instance.

fastpartialmatch: fix devel.warn
ClosedPublic

Authored by stash on Jul 17 2017, 5:28 AM.
Tags
None
Subscribers

Details

Reviewers
durham
Group Reviewers
Restricted Project
Commits
rFBHGXe1eed1cbdad6: fastpartialmatch: fix devel.warn
Summary

Upstream hg recently introduced new developer warning if files inside .hg are
modified without taking a lock. The usual fix is to add file in
localrepository._wlockfreeprefix list, but it doesn't work for "needrebuild"
fastpartialmatch file because it's stored inside .hg/store.
So to get rid of developer warning let's move needrebuild file to .hg/.
And since we are detecting that partial index needs to be rebuilt in revlog class,
I also had to wrap runcommand() and create needrebuild file there, because
runcommand() has vfs object, while revlog class doesn't.

Test Plan

Run tests

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

stash created this revision.Jul 17 2017, 5:28 AM
stash added a comment.Jul 17 2017, 5:29 AM

There is a diff that fixes the same issue - https://phab.mercurial-scm.org/D89, but this version seems a bit simpler and doesn't cause tests to fail

durham accepted this revision.Jul 17 2017, 5:46 AM
durham added a subscriber: durham.

Not a huge fan of passing the value back up via a config option, but I guess it's fine for now.

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