mq/qqueue: --list does not print (active) with --quiet
For scripting purposes, it can be convenient to get a simple listing of
available queues, without indication of the active one.
--quiet documentation change removed by Patrick Mézard.
--- a/hgext/mq.py Sun Aug 08 22:29:39 2010 +0200
+++ b/hgext/mq.py Sun Aug 08 22:49:01 2010 +0200
@@ -2663,7 +2663,7 @@
current = _getcurrent()
for queue in _getqueues():
ui.write('%s' % (queue,))
- if queue == current:
+ if queue == current and not ui.quiet:
ui.write(_(' (active)\n'))
else:
ui.write('\n')
--- a/tests/test-mq-qqueue Sun Aug 08 22:29:39 2010 +0200
+++ b/tests/test-mq-qqueue Sun Aug 08 22:49:01 2010 +0200
@@ -28,6 +28,9 @@
hg qqueue foo
hg qqueue
+echo %% list queues, quiet
+hg qqueue --quiet
+
echo %% fail creating queue with already existing name
hg qqueue --create foo
hg qqueue
--- a/tests/test-mq-qqueue.out Sun Aug 08 22:29:39 2010 +0200
+++ b/tests/test-mq-qqueue.out Sun Aug 08 22:49:01 2010 +0200
@@ -12,6 +12,9 @@
%% switch queue
foo (active)
patches
+%% list queues, quiet
+foo
+patches
%% fail creating queue with already existing name
abort: queue "foo" already exists
foo (active)