diff -r 39256bee2ed9 -r 6065a8936b00 mercurial/hg.py --- 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)