##// END OF EJS Templates
mq/qqueue: print current queue name...
"Yann E. MORIN" -
r14987:3709cca3 default
parent child Browse files
Show More
@@ -2915,6 +2915,7 b' def finish(ui, repo, *revrange, **opts):'
2915
2915
2916 @command("qqueue",
2916 @command("qqueue",
2917 [('l', 'list', False, _('list all available queues')),
2917 [('l', 'list', False, _('list all available queues')),
2918 ('', 'active', False, _('print name of active queue')),
2918 ('c', 'create', False, _('create new queue')),
2919 ('c', 'create', False, _('create new queue')),
2919 ('', 'rename', False, _('rename active queue')),
2920 ('', 'rename', False, _('rename active queue')),
2920 ('', 'delete', False, _('delete reference to queue')),
2921 ('', 'delete', False, _('delete reference to queue')),
@@ -2929,7 +2930,8 b' def qqueue(ui, repo, name=None, **opts):'
2929
2930
2930 Omitting a queue name or specifying -l/--list will show you the registered
2931 Omitting a queue name or specifying -l/--list will show you the registered
2931 queues - by default the "normal" patches queue is registered. The currently
2932 queues - by default the "normal" patches queue is registered. The currently
2932 active queue will be marked with "(active)".
2933 active queue will be marked with "(active)". Specifying --active will print
2934 only the name of the active queue.
2933
2935
2934 To create a new queue, use -c/--create. The queue is automatically made
2936 To create a new queue, use -c/--create. The queue is automatically made
2935 active, except in the case where there are applied patches from the
2937 active, except in the case where there are applied patches from the
@@ -3022,8 +3024,11 b' def qqueue(ui, repo, name=None, **opts):'
3022 fh.close()
3024 fh.close()
3023 util.rename(repo.join('patches.queues.new'), repo.join(_allqueues))
3025 util.rename(repo.join('patches.queues.new'), repo.join(_allqueues))
3024
3026
3025 if not name or opts.get('list'):
3027 if not name or opts.get('list') or opts.get('active'):
3026 current = _getcurrent()
3028 current = _getcurrent()
3029 if opts.get('active'):
3030 ui.write('%s\n' % (current,))
3031 return
3027 for queue in _getqueues():
3032 for queue in _getqueues():
3028 ui.write('%s' % (queue,))
3033 ui.write('%s' % (queue,))
3029 if queue == current and not ui.quiet:
3034 if queue == current and not ui.quiet:
General Comments 0
You need to be logged in to leave comments. Login now