equal
deleted
inserted
replaced
|
1 # stack.py - code related to stack workflow |
|
2 # |
|
3 # This software may be used and distributed according to the terms of the |
|
4 # GNU General Public License version 2 or any later version. |
|
5 from mercurial.i18n import _ |
|
6 from mercurial import error |
|
7 |
|
8 def _getstack(repo, topic): |
|
9 # XXX need to exclude obsolete changesets |
|
10 # XXX need sorting |
|
11 return repo.revs("topic(%s)", topic) |
|
12 |
|
13 def showstack(ui, repo, topic): |
|
14 if not topic: |
|
15 topic = repo.currenttopic |
|
16 if not topic: |
|
17 raise error.Abort(_('no active topic to list')) |
|
18 for r in _getstack(repo, topic): |
|
19 # super crude initial version |
|
20 ui.write(repo[r].description().splitlines()[0] + '\n') |