comparison mercurial/localrepo.py @ 41229:50ca531f1f24

narrow: copy store narrowspec to working copy immediately We no longer need to delay it until the end of the transaction since we now restore a backup if the transaction aborts. Differential Revision: https://phab.mercurial-scm.org/D5506
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 29 Dec 2018 23:01:12 -0800
parents 3b35ebdb9f8c
children d2d716cc0700
comparison
equal deleted inserted replaced
41228:3b35ebdb9f8c 41229:50ca531f1f24
1250 return matchmod.intersectmatchers(match, self._narrowmatch) 1250 return matchmod.intersectmatchers(match, self._narrowmatch)
1251 return self._narrowmatch 1251 return self._narrowmatch
1252 1252
1253 def setnarrowpats(self, newincludes, newexcludes): 1253 def setnarrowpats(self, newincludes, newexcludes):
1254 narrowspec.save(self, newincludes, newexcludes) 1254 narrowspec.save(self, newincludes, newexcludes)
1255 narrowspec.copytoworkingcopy(self, self.currenttransaction()) 1255 narrowspec.copytoworkingcopy(self)
1256 self.invalidate(clearfilecache=True) 1256 self.invalidate(clearfilecache=True)
1257 # So the next access won't be considered a conflict 1257 # So the next access won't be considered a conflict
1258 # TODO: It seems like there should be a way of doing this that 1258 # TODO: It seems like there should be a way of doing this that
1259 # doesn't involve replacing these attributes. 1259 # doesn't involve replacing these attributes.
1260 self.narrowpats = newincludes, newexcludes 1260 self.narrowpats = newincludes, newexcludes