hgext3rd/topic/stack.py
changeset 1978 e42dd4523c0d
parent 1977 137f8b04901e
child 1979 bee7a1ef8ba8
--- a/hgext3rd/topic/stack.py	Fri Aug 12 23:59:37 2016 +0200
+++ b/hgext3rd/topic/stack.py	Sat Aug 13 01:24:10 2016 +0200
@@ -68,10 +68,12 @@
     """get various data about a stack
 
     :changesetcount: number of non-obsolete changesets in the stack
+    :troubledcount: number on troubled changesets
     """
     data = {}
     revs = repo.revs("topic(%s) - obsolete()", topic)
     data['changesetcount'] = len(revs)
+    data['troubledcount'] = len([r for r in revs if repo[r].troubled()])
     return data
 
 # Copied from evolve 081605c2e9b6