Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 31288:052bc876a879
localrepo: rename proxycls to filteredrepo
When debugging in a Python shell, the type of "repo" is "proxycls", which
could confuse new people.
In [1]: repo
Out[1]: <mercurial.localrepo.proxycls at 0x7f65d4b976d0>
Let's rename it to "filteredrepo" to make it clearer.
author | Jun Wu <quark@fb.com> |
---|---|
date | Thu, 09 Mar 2017 15:10:27 -0800 |
parents | 0a38a313033e |
children | b9228a2219ca |
comparison
equal
deleted
inserted
replaced
31287:1c97a91a18dc | 31288:052bc876a879 |
---|---|
482 | 482 |
483 def filtered(self, name): | 483 def filtered(self, name): |
484 """Return a filtered version of a repository""" | 484 """Return a filtered version of a repository""" |
485 # build a new class with the mixin and the current class | 485 # build a new class with the mixin and the current class |
486 # (possibly subclass of the repo) | 486 # (possibly subclass of the repo) |
487 class proxycls(repoview.repoview, self.unfiltered().__class__): | 487 class filteredrepo(repoview.repoview, self.unfiltered().__class__): |
488 pass | 488 pass |
489 return proxycls(self, name) | 489 return filteredrepo(self, name) |
490 | 490 |
491 @repofilecache('bookmarks', 'bookmarks.current') | 491 @repofilecache('bookmarks', 'bookmarks.current') |
492 def _bookmarks(self): | 492 def _bookmarks(self): |
493 return bookmarks.bmstore(self) | 493 return bookmarks.bmstore(self) |
494 | 494 |