HomePhabricator

narrow: widen when files are excluded by sparse and not included by narrow

Authored by charlesetc.

Description

narrow: widen when files are excluded by sparse and not included by narrow

In a repo where some directories are included by narrow and the complement are
excluded by sparse, it was previously impossible to widen either because trying
to widen narrow would complain that the requested files are outside the sparse
checkout and trying to widen sparse would complain that the requested files are
outside the narrow checkout.

This changes the hg tracked --addinclude command to only actually update any
newly accessible files in the dirstate if they are also accessible via sparse.

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