# HG changeset patch # User Pierre-Yves David # Date 1677123316 -3600 # Node ID 6065a8936b00c8a276a2be2ae80220b4e2aa23c3 # Parent 39256bee2ed9ac9e48d851e9f360a56af65d2d2e narrow: write the narrow spec in a transaction during clone It will be simpler if all write happens within transaction. 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)