diff -r 7c05b1625921 -r 55c347b4874f hgext3rd/topic/stack.py --- a/hgext3rd/topic/stack.py Sun May 05 17:39:46 2019 +0800 +++ b/hgext3rd/topic/stack.py Wed May 08 15:57:54 2019 +0800 @@ -77,6 +77,11 @@ def __getitem__(self, index): return self.revs[index] + def __nonzero__(self): + return bool(self._revs) + + __bool__ = __nonzero__ + def index(self, item): return self.revs.index(item)