changeset 51805:0d7ccb163b4f

debugsparse: stop taking the store lock debugsparse is a workspace-only opperation, or it better be workspace-only. Let's make it to stop taking the store lock.
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Thu, 15 Aug 2024 13:52:14 +0100
parents e69e3d585f07
children 95cdc01f313d
files mercurial/sparse.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/sparse.py	Thu Aug 15 14:54:22 2024 +0100
+++ b/mercurial/sparse.py	Thu Aug 15 13:52:14 2024 +0100
@@ -612,7 +612,7 @@
     repo, includes, excludes, profiles, force=False, removing=False
 ):
     """Update the sparse config and working directory state."""
-    with repo.lock():
+    with repo.wlock():
         raw = repo.vfs.tryread(b'sparse')
         oldincludes, oldexcludes, oldprofiles = parseconfig(
             repo.ui, raw, b'sparse'
@@ -730,7 +730,7 @@
 
     The new config is written out and a working directory refresh is performed.
     """
-    with repo.wlock(), repo.lock(), repo.dirstate.changing_parents(repo):
+    with repo.wlock(), repo.dirstate.changing_parents(repo):
         raw = repo.vfs.tryread(b'sparse')
         oldinclude, oldexclude, oldprofiles = parseconfig(
             repo.ui, raw, b'sparse'