Mercurial > hg
comparison mercurial/localrepo.py @ 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 | a2ae27993e16 |
children | d82dd55024e7 |
comparison
equal
deleted
inserted
replaced
41235:a2ae27993e16 | 41236:44a51c1c8e17 |
---|---|
1257 return matchmod.intersectmatchers(match, self._narrowmatch) | 1257 return matchmod.intersectmatchers(match, self._narrowmatch) |
1258 return self._narrowmatch | 1258 return self._narrowmatch |
1259 | 1259 |
1260 def setnarrowpats(self, newincludes, newexcludes): | 1260 def setnarrowpats(self, newincludes, newexcludes): |
1261 narrowspec.save(self, newincludes, newexcludes) | 1261 narrowspec.save(self, newincludes, newexcludes) |
1262 narrowspec.copytoworkingcopy(self) | |
1263 self.invalidate(clearfilecache=True) | 1262 self.invalidate(clearfilecache=True) |
1264 | 1263 |
1265 def __getitem__(self, changeid): | 1264 def __getitem__(self, changeid): |
1266 if changeid is None: | 1265 if changeid is None: |
1267 return context.workingctx(self) | 1266 return context.workingctx(self) |