changeset 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 84607c8b5af8
files mercurial/repoview.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/repoview.py	Tue Dec 05 21:50:33 2017 +0900
+++ b/mercurial/repoview.py	Tue Dec 05 21:56:48 2017 +0900
@@ -15,6 +15,7 @@
 from . import (
     obsolete,
     phases,
+    pycompat,
     tags as tagsmod,
 )
 
@@ -232,6 +233,11 @@
             return self
         return self.unfiltered().filtered(name)
 
+    def __repr__(self):
+        return r'<%s:%s %r>' % (self.__class__.__name__,
+                                pycompat.sysstr(self.filtername),
+                                self.unfiltered())
+
     # everything access are forwarded to the proxied repo
     def __getattr__(self, attr):
         return getattr(self._unfilteredrepo, attr)