diff mercurial/sparse.py @ 48494:b74ee41addee stable

sparse: lock the store when updating requirements config Differential Revision: https://phab.mercurial-scm.org/D11817
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Mon, 29 Nov 2021 12:27:33 +0000
parents 000ea893aad3
children a62ba3345534
line wrap: on
line diff
--- a/mercurial/sparse.py	Tue Nov 16 17:35:57 2021 +0000
+++ b/mercurial/sparse.py	Mon Nov 29 12:27:33 2021 +0000
@@ -718,7 +718,7 @@
 
     The new config is written out and a working directory refresh is performed.
     """
-    with repo.wlock(), repo.dirstate.parentchange():
+    with repo.wlock(), repo.lock(), repo.dirstate.parentchange():
         raw = repo.vfs.tryread(b'sparse')
         oldinclude, oldexclude, oldprofiles = parseconfig(
             repo.ui, raw, b'sparse'