comparison tests/test-narrow-expanddirstate.t @ 49960:c166b212bdee

dirstate: pass the repo to the `changeparent` method If we want the context to be responsible for writing (and we want it), we need to have access to a localrepository object. So we now requires a localrepository object as an argument to this context manager.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 25 Jan 2023 18:46:20 +0100
parents 6a454e7053a1
children 7a8bfc05b691
comparison
equal deleted inserted replaced
49959:376395868b7b 49960:c166b212bdee
72 > ui.develwarn(b'expandnarrowspec called outside of transaction!') 72 > ui.develwarn(b'expandnarrowspec called outside of transaction!')
73 > repo.setnarrowpats(includes, excludes) 73 > repo.setnarrowpats(includes, excludes)
74 > narrowspec.copytoworkingcopy(repo) 74 > narrowspec.copytoworkingcopy(repo)
75 > newmatcher = narrowspec.match(repo.root, includes, excludes) 75 > newmatcher = narrowspec.match(repo.root, includes, excludes)
76 > added = matchmod.differencematcher(newmatcher, currentmatcher) 76 > added = matchmod.differencematcher(newmatcher, currentmatcher)
77 > with repo.dirstate.parentchange(): 77 > with repo.dirstate.parentchange(repo):
78 > for f in repo[b'.'].manifest().walk(added): 78 > for f in repo[b'.'].manifest().walk(added):
79 > repo.dirstate.update_file( 79 > repo.dirstate.update_file(
80 > f, 80 > f,
81 > p1_tracked=True, 81 > p1_tracked=True,
82 > wc_tracked=True, 82 > wc_tracked=True,