Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 41235:a2ae27993e16
narrow: drop now-unnecessary reassignment of repo attributes
Differential Revision: https://phab.mercurial-scm.org/D5507
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 29 Dec 2018 23:09:07 -0800 |
parents | d2d716cc0700 |
children | 44a51c1c8e17 |
comparison
equal
deleted
inserted
replaced
41234:4c0d4bbdc395 | 41235:a2ae27993e16 |
---|---|
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) | 1262 narrowspec.copytoworkingcopy(self) |
1263 self.invalidate(clearfilecache=True) | 1263 self.invalidate(clearfilecache=True) |
1264 # So the next access won't be considered a conflict | |
1265 # TODO: It seems like there should be a way of doing this that | |
1266 # doesn't involve replacing these attributes. | |
1267 self.narrowpats = newincludes, newexcludes | |
1268 self._narrowmatch = narrowspec.match(self.root, include=newincludes, | |
1269 exclude=newexcludes) | |
1270 | 1264 |
1271 def __getitem__(self, changeid): | 1265 def __getitem__(self, changeid): |
1272 if changeid is None: | 1266 if changeid is None: |
1273 return context.workingctx(self) | 1267 return context.workingctx(self) |
1274 if isinstance(changeid, context.basectx): | 1268 if isinstance(changeid, context.basectx): |