Mercurial > hg
comparison tests/test-narrow-expanddirstate.t @ 47740:28d5e05c139a
narrow: stop using `normallookup` during a test
Differential Revision: https://phab.mercurial-scm.org/D11182
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 19 Jul 2021 15:41:51 +0200 |
parents | 44a51c1c8e17 |
children | 6a454e7053a1 |
comparison
equal
deleted
inserted
replaced
47739:6a06155dfaef | 47740:28d5e05c139a |
---|---|
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 > for f in repo[b'.'].manifest().walk(added): | 77 > with repo.dirstate.parentchange(): |
78 > repo.dirstate.normallookup(f) | 78 > for f in repo[b'.'].manifest().walk(added): |
79 > repo.dirstate.update_file( | |
80 > f, | |
81 > p1_tracked=True, | |
82 > wc_tracked=True, | |
83 > possibly_dirty=True, | |
84 > ) | |
79 > | 85 > |
80 > def reposetup(ui, repo): | 86 > def reposetup(ui, repo): |
81 > class expandingrepo(repo.__class__): | 87 > class expandingrepo(repo.__class__): |
82 > def narrowmatch(self, *args, **kwargs): | 88 > def narrowmatch(self, *args, **kwargs): |
83 > with repo.wlock(), repo.lock(), repo.transaction( | 89 > with repo.wlock(), repo.lock(), repo.transaction( |