diff 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
line wrap: on
line diff
--- a/mercurial/sparse.py	Thu Jul 08 18:51:45 2021 +0200
+++ b/mercurial/sparse.py	Thu Jul 08 18:59:55 2021 +0200
@@ -646,7 +646,7 @@
     The updated sparse config is written out and the working directory
     is refreshed, as needed.
     """
-    with repo.wlock():
+    with repo.wlock(), repo.dirstate.parentchange():
         # read current configuration
         raw = repo.vfs.tryread(b'sparse')
         includes, excludes, profiles = parseconfig(repo.ui, raw, b'sparse')