Mercurial > hg
changeset 47606:26bf0b9fe78f
sparse: clear rules in the context of a `parentchanges` context
This is the same logic as the change we did for narrow.
Differential Revision: https://phab.mercurial-scm.org/D11029
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 08 Jul 2021 19:06:32 +0200 |
parents | a5701ffc10e4 |
children | ff82edadc2e1 |
files | mercurial/sparse.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/sparse.py Thu Jul 08 18:59:55 2021 +0200 +++ b/mercurial/sparse.py Thu Jul 08 19:06:32 2021 +0200 @@ -630,7 +630,7 @@ The remaining sparse config only has profiles, if defined. The working directory is refreshed, as needed. """ - with repo.wlock(): + with repo.wlock(), repo.dirstate.parentchange(): raw = repo.vfs.tryread(b'sparse') includes, excludes, profiles = parseconfig(repo.ui, raw, b'sparse') @@ -708,7 +708,7 @@ The new config is written out and a working directory refresh is performed. """ - with repo.wlock(): + with repo.wlock(), repo.dirstate.parentchange(): raw = repo.vfs.tryread(b'sparse') oldinclude, oldexclude, oldprofiles = parseconfig( repo.ui, raw, b'sparse'