topics: list only topic names in quiet mode
This will be helpful in bash completion.
--- a/hgext3rd/topic/__init__.py Wed Dec 27 23:51:18 2017 +0530
+++ b/hgext3rd/topic/__init__.py Thu Dec 28 04:09:02 2017 +0530
@@ -903,6 +903,9 @@
fm.write('topic', namemask, topic, label=label)
fm.data(active=active)
+ if ui.quiet:
+ fm.plain('\n')
+ continue
data = stack.stack(repo, topic=topic)
fm.plain(' (')
if ui.verbose:
--- a/tests/test-topic-stack-data.t Wed Dec 27 23:51:18 2017 +0530
+++ b/tests/test-topic-stack-data.t Thu Dec 28 04:09:02 2017 +0530
@@ -173,10 +173,10 @@
quiet version
$ hg topic --quiet
- bar (5 changesets, 1 troubled, 2 heads)
- baz (2 changesets)
- foo (2 changesets)
- fuz (3 changesets, 2 troubled)
+ bar
+ baz
+ foo
+ fuz
verbose