Mercurial > hg
changeset 50189:6065a8936b00
narrow: write the narrow spec in a transaction during clone
It will be simpler if all write happens within transaction.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 23 Feb 2023 04:35:16 +0100 |
parents | 39256bee2ed9 |
children | 34db5692d537 |
files | mercurial/hg.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hg.py Thu Feb 23 03:28:44 2023 +0100 +++ b/mercurial/hg.py Thu Feb 23 04:35:16 2023 +0100 @@ -986,7 +986,9 @@ local = destpeer.local() if local: if narrow: - with local.wlock(), local.lock(): + with local.wlock(), local.lock(), local.transaction( + b'narrow-clone' + ): local.setnarrowpats(storeincludepats, storeexcludepats) narrowspec.copytoworkingcopy(local)