equal
deleted
inserted
replaced
61 fm.condwrite(state != 'clean' and idx is not None, 'topic.stack.state', |
61 fm.condwrite(state != 'clean' and idx is not None, 'topic.stack.state', |
62 ' (%s)', state, |
62 ' (%s)', state, |
63 label='topic.stack.state topic.stack.state.%s' % state) |
63 label='topic.stack.state topic.stack.state.%s' % state) |
64 fm.plain('\n') |
64 fm.plain('\n') |
65 fm.end() |
65 fm.end() |
|
66 |
|
67 def stackdata(repo, topic): |
|
68 """get various data about a stack |
|
69 |
|
70 :changesetcount: number of non-obsolete changesets in the stack |
|
71 """ |
|
72 data = {} |
|
73 revs = repo.revs("topic(%s) - obsolete()", topic) |
|
74 data['changesetcount'] = len(revs) |
|
75 return data |
66 |
76 |
67 # Copied from evolve 081605c2e9b6 |
77 # Copied from evolve 081605c2e9b6 |
68 |
78 |
69 def _orderrevs(repo, revs): |
79 def _orderrevs(repo, revs): |
70 """Compute an ordering to solve instability for the given revs |
80 """Compute an ordering to solve instability for the given revs |