next: also use stack shortcut in output when possible
This mirror what `hg evolve` is doing since cc3a0b13ae57.
--- a/hgext3rd/evolve/__init__.py Fri Oct 12 11:33:30 2018 +0200
+++ b/hgext3rd/evolve/__init__.py Fri Oct 12 14:33:03 2018 +0200
@@ -1143,11 +1143,12 @@
children = [ctx for ctx in wparents[0].children() if not ctx.obsolete()]
topic = _getcurrenttopic(repo)
filtered = set()
+ template = shorttemplate
if topic and not opts.get("no_topic", False):
filtered = set(ctx for ctx in children if ctx.topic() != topic)
children = [ctx for ctx in children if ctx not in filtered]
- displayer = compat.changesetdisplayer(ui, repo,
- {'template': shorttemplate})
+ template = utility.stacktemplate
+ displayer = compat.changesetdisplayer(ui, repo, {'template': template})
if len(children) == 1:
c = children[0]
return _updatetonext(ui, repo, c, displayer, opts)
--- a/tests/test-evolve-topic.t Fri Oct 12 11:33:30 2018 +0200
+++ b/tests/test-evolve-topic.t Fri Oct 12 14:33:03 2018 +0200
@@ -210,7 +210,7 @@
[12] add eee
$ hg next
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- [13] add fff
+ [s4] add fff
$ hg next
no children on topic "foo"
do you want --no-topic
--- a/tests/test-topic-tutorial.t Fri Oct 12 11:33:30 2018 +0200
+++ b/tests/test-topic-tutorial.t Fri Oct 12 14:33:03 2018 +0200
@@ -1165,7 +1165,7 @@
$ hg next
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- [15] Adding drill
+ [s3] Adding drill
$ hg stack
### topic: tools