changeset 4351 | 619c7f9302fc |
parent 4252 | 6c4f109c2b03 |
child 4383 | e62a9efdd90a |
--- a/mixins.py Tue Jan 26 10:22:48 2010 +0100 +++ b/mixins.py Tue Jan 26 10:23:38 2010 +0100 @@ -98,7 +98,7 @@ path.reverse() return path - def iterparents(self): + def iterparents(self, strict=True): def _uptoroot(self): curr = self while True: @@ -106,6 +106,8 @@ if curr is None: break yield curr + if not strict: + return chain([self], _uptoroot(self)) return _uptoroot(self) def notification_references(self, view):