comparison mercurial/hg.py @ 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 e0c0545e2e55
children 99faa396e186
comparison
equal deleted inserted replaced
50188:39256bee2ed9 50189:6065a8936b00
984 else: 984 else:
985 revs = None 985 revs = None
986 local = destpeer.local() 986 local = destpeer.local()
987 if local: 987 if local:
988 if narrow: 988 if narrow:
989 with local.wlock(), local.lock(): 989 with local.wlock(), local.lock(), local.transaction(
990 b'narrow-clone'
991 ):
990 local.setnarrowpats(storeincludepats, storeexcludepats) 992 local.setnarrowpats(storeincludepats, storeexcludepats)
991 narrowspec.copytoworkingcopy(local) 993 narrowspec.copytoworkingcopy(local)
992 994
993 u = urlutil.url(abspath) 995 u = urlutil.url(abspath)
994 defaulturl = bytes(u) 996 defaulturl = bytes(u)