comparison tests/test-narrow-expanddirstate.t @ 41236:44a51c1c8e17

narrow: move copytonarrowspec() out of setnarrowpats() I think it was a mistake to write the working copy's narrowspec every time the store narrowspec is written. This starts separating those actions. Differential Revision: https://phab.mercurial-scm.org/D5509
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 29 Dec 2018 23:40:18 -0800
parents 92fde28860bb
children 28d5e05c139a
comparison
equal deleted inserted replaced
41235:a2ae27993e16 41236:44a51c1c8e17
69 > currentmatcher = narrowspec.match(repo.root, includes, excludes) 69 > currentmatcher = narrowspec.match(repo.root, includes, excludes)
70 > includes = includes | newincludes 70 > includes = includes | newincludes
71 > if not repo.currenttransaction(): 71 > if not repo.currenttransaction():
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 > newmatcher = narrowspec.match(repo.root, includes, excludes) 75 > newmatcher = narrowspec.match(repo.root, includes, excludes)
75 > added = matchmod.differencematcher(newmatcher, currentmatcher) 76 > added = matchmod.differencematcher(newmatcher, currentmatcher)
76 > for f in repo[b'.'].manifest().walk(added): 77 > for f in repo[b'.'].manifest().walk(added):
77 > repo.dirstate.normallookup(f) 78 > repo.dirstate.normallookup(f)
78 > 79 >