Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/sparse.py @ 48343: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 |
comparison
equal
deleted
inserted
replaced
48342:50330d481640 | 48343:b74ee41addee |
---|---|
716 | 716 |
717 Only one of the actions may be performed. | 717 Only one of the actions may be performed. |
718 | 718 |
719 The new config is written out and a working directory refresh is performed. | 719 The new config is written out and a working directory refresh is performed. |
720 """ | 720 """ |
721 with repo.wlock(), repo.dirstate.parentchange(): | 721 with repo.wlock(), repo.lock(), repo.dirstate.parentchange(): |
722 raw = repo.vfs.tryread(b'sparse') | 722 raw = repo.vfs.tryread(b'sparse') |
723 oldinclude, oldexclude, oldprofiles = parseconfig( | 723 oldinclude, oldexclude, oldprofiles = parseconfig( |
724 repo.ui, raw, b'sparse' | 724 repo.ui, raw, b'sparse' |
725 ) | 725 ) |
726 | 726 |