Commits

Yuya Nishihara committed 12e2f0f

reporegistry: fix AttributeError on open all including sub group

If RepoGroupItem contains child group, childRoots() raises AttributeError:
'RepoGroupItem' object has no attribute '_root'.

Comments (0)

Files changed (1)

tortoisehg/hgqt/repotreeitem.py

             | Qt.ItemIsDragEnabled | Qt.ItemIsEditable)
 
     def childRoots(self):
-        return [c._root for c in self.childs]
+        return [c._root for c in self.childs if isinstance(c, RepoItem)]
 
     def dump(self, xw):
         xw.writeAttribute('name', self.name)