HomePhabricator

narrowspec: replace one recursion-avoidance hack with another

Authored by martinvonz.

Description

narrowspec: replace one recursion-avoidance hack with another

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.

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

Details

Committed
martinvonzMay 31 2019, 6:28 PM
Differential Revision
D6468: narrowspec: replace one recursion-avoidance hack with another
Parents
rHGa5b5ecff5f37: merge: simplify initialization of "pas"
Branches
Unknown
Tags
Unknown