Mercurial > public > mercurial-scm > evolve
diff src/topic/stack.py @ 1898:2b65c5a6591c
task: add index number to the output
We are doing to use these number for easy movement in later changesets. The
numbering will probably evolve over time but this is a good start.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 14 Mar 2016 18:24:33 +0000 |
parents | 38570c53b1cf |
children |
line wrap: on
line diff
--- a/src/topic/stack.py Mon Mar 14 18:11:52 2016 +0000 +++ b/src/topic/stack.py Mon Mar 14 18:24:33 2016 +0000 @@ -18,10 +18,10 @@ topic = repo.currenttopic if not topic: raise error.Abort(_('no active topic to list')) - for r in _getstack(repo, topic): + for idx, r in enumerate(_getstack(repo, topic)): # super crude initial version - ui.write(repo[r].description().splitlines()[0] + '\n') - + l = "%d: %s\n" % (idx, repo[r].description().splitlines()[0]) + ui.write(l) # Copied from evolve 081605c2e9b6