This is an archive of the discontinued Mercurial Phabricator instance.

narrowspec: replace one recursion-avoidance hack with another
ClosedPublic

Authored by martinvonz on May 31 2019, 7:34 PM.

Details

Summary

When updating the working copy narrowspec, we call context.walk() in
order to find which files to update the working copy
with. context.walk() calls repo.narrowmatch(). In order to avoid
infinite recursion in this case, we have a hack that assigns the new
values for repo.narrowpats and repo._narrowmatch. However, doing that
of course breaks future invalidation of those properties (they're
@storecache'd). Let's instead avoid the infinite recursion by setting
a flag on the repo instance when we're updating the working copy.

Diff Detail

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

Event Timeline

martinvonz created this revision.May 31 2019, 7:34 PM
This revision was automatically updated to reflect the committed changes.