Mercurial > hg
comparison mercurial/repoview.py @ 35249:d4ad9d695a9e
repoview: include filter name in repr for debugging
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 05 Dec 2017 21:56:48 +0900 |
parents | c752fbe228fb |
children | 3ad582b2895c |
comparison
equal
deleted
inserted
replaced
35248:c752fbe228fb | 35249:d4ad9d695a9e |
---|---|
13 | 13 |
14 from .node import nullrev | 14 from .node import nullrev |
15 from . import ( | 15 from . import ( |
16 obsolete, | 16 obsolete, |
17 phases, | 17 phases, |
18 pycompat, | |
18 tags as tagsmod, | 19 tags as tagsmod, |
19 ) | 20 ) |
20 | 21 |
21 def hideablerevs(repo): | 22 def hideablerevs(repo): |
22 """Revision candidates to be hidden | 23 """Revision candidates to be hidden |
230 """Return a filtered version of a repository""" | 231 """Return a filtered version of a repository""" |
231 if name == self.filtername: | 232 if name == self.filtername: |
232 return self | 233 return self |
233 return self.unfiltered().filtered(name) | 234 return self.unfiltered().filtered(name) |
234 | 235 |
236 def __repr__(self): | |
237 return r'<%s:%s %r>' % (self.__class__.__name__, | |
238 pycompat.sysstr(self.filtername), | |
239 self.unfiltered()) | |
240 | |
235 # everything access are forwarded to the proxied repo | 241 # everything access are forwarded to the proxied repo |
236 def __getattr__(self, attr): | 242 def __getattr__(self, attr): |
237 return getattr(self._unfilteredrepo, attr) | 243 return getattr(self._unfilteredrepo, attr) |
238 | 244 |
239 def __setattr__(self, attr, value): | 245 def __setattr__(self, attr, value): |