Mercurial > public > mercurial-scm > hg
comparison mercurial/sparse.py @ 47605:a5701ffc10e4
sparse: make sure we adjust the dirstate at the same time as the parent
This is more correct and help our API split.
Differential Revision: https://phab.mercurial-scm.org/D11028
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 08 Jul 2021 18:59:55 +0200 |
parents | d55b71393907 |
children | 26bf0b9fe78f |
comparison
equal
deleted
inserted
replaced
47604:090fc6a95e50 | 47605:a5701ffc10e4 |
---|---|
644 """Import sparse config rules from files. | 644 """Import sparse config rules from files. |
645 | 645 |
646 The updated sparse config is written out and the working directory | 646 The updated sparse config is written out and the working directory |
647 is refreshed, as needed. | 647 is refreshed, as needed. |
648 """ | 648 """ |
649 with repo.wlock(): | 649 with repo.wlock(), repo.dirstate.parentchange(): |
650 # read current configuration | 650 # read current configuration |
651 raw = repo.vfs.tryread(b'sparse') | 651 raw = repo.vfs.tryread(b'sparse') |
652 includes, excludes, profiles = parseconfig(repo.ui, raw, b'sparse') | 652 includes, excludes, profiles = parseconfig(repo.ui, raw, b'sparse') |
653 aincludes, aexcludes, aprofiles = activeconfig(repo) | 653 aincludes, aexcludes, aprofiles = activeconfig(repo) |
654 | 654 |