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.
--- 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'