comparison mercurial/sparse.py @ 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 7a8bfc05b691
children 95cdc01f313d
comparison
equal deleted inserted replaced
51804:e69e3d585f07 51805:0d7ccb163b4f
610 610
611 def _updateconfigandrefreshwdir( 611 def _updateconfigandrefreshwdir(
612 repo, includes, excludes, profiles, force=False, removing=False 612 repo, includes, excludes, profiles, force=False, removing=False
613 ): 613 ):
614 """Update the sparse config and working directory state.""" 614 """Update the sparse config and working directory state."""
615 with repo.lock(): 615 with repo.wlock():
616 raw = repo.vfs.tryread(b'sparse') 616 raw = repo.vfs.tryread(b'sparse')
617 oldincludes, oldexcludes, oldprofiles = parseconfig( 617 oldincludes, oldexcludes, oldprofiles = parseconfig(
618 repo.ui, raw, b'sparse' 618 repo.ui, raw, b'sparse'
619 ) 619 )
620 620
728 ): 728 ):
729 """Perform a sparse config update. 729 """Perform a sparse config update.
730 730
731 The new config is written out and a working directory refresh is performed. 731 The new config is written out and a working directory refresh is performed.
732 """ 732 """
733 with repo.wlock(), repo.lock(), repo.dirstate.changing_parents(repo): 733 with repo.wlock(), repo.dirstate.changing_parents(repo):
734 raw = repo.vfs.tryread(b'sparse') 734 raw = repo.vfs.tryread(b'sparse')
735 oldinclude, oldexclude, oldprofiles = parseconfig( 735 oldinclude, oldexclude, oldprofiles = parseconfig(
736 repo.ui, raw, b'sparse' 736 repo.ui, raw, b'sparse'
737 ) 737 )
738 738