Commits

Yuya Nishihara committed 6c9bd1f

thgrepo: wrap changectx.sub() to return thgrepo-aware subrepo obj (fixes #1386)

It isn't nice to access internal member of hgsubrepo, but it works.

Comments (0)

Files changed (1)

tortoisehg/hgqt/thgrepo.py

 
 def _extendchangectx(changectx):
     class thgchangectx(changectx.__class__):
+        def sub(self, path):
+            srepo = super(thgchangectx, self).sub(path)
+            if isinstance(srepo, subrepo.hgsubrepo):
+                srepo._repo.__class__ = _extendrepo(srepo._repo)
+            return srepo
+
         def thgtags(self):
             '''Returns all unhidden tags for self'''
             htlist = self._repo._thghiddentags