stack: exclude obsolete changeset from the set
We care about relevant changeset, obsolete have a new version somewhere and we
don't care about the old one in our display.
In case of unstability, the ordering used is still wrong.
# stack.py - code related to stack workflow
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from mercurial.i18n import _
from mercurial import error
def _getstack(repo, topic):
# XXX need sorting
return repo.revs("topic(%s) - obsolete()", topic)
def showstack(ui, repo, topic):
if not topic:
topic = repo.currenttopic
if not topic:
raise error.Abort(_('no active topic to list'))
for r in _getstack(repo, topic):
# super crude initial version
ui.write(repo[r].description().splitlines()[0] + '\n')