##// END OF EJS Templates
mq: add --mq option to some commands...
Brendan Cully -
r10359:ec02cf8d default
parent child Browse files
Show More
@@ -2607,8 +2607,28 b' def mqimport(orig, ui, repo, *args, **kw'
2607 kwargs.get('force'))
2607 kwargs.get('force'))
2608 return orig(ui, repo, *args, **kwargs)
2608 return orig(ui, repo, *args, **kwargs)
2609
2609
2610 def mqcommand(orig, ui, repo, *args, **kwargs):
2611 """Add --mq option to operate on patch repository instead of main"""
2612
2613 # some commands do not like getting unknown options
2614 mq = kwargs['mq']
2615 del kwargs['mq']
2616
2617 if not mq:
2618 return orig(ui, repo, *args, **kwargs)
2619
2620 q = repo.mq
2621 r = q.qrepo()
2622 if not r:
2623 raise util.Abort('no queue repository')
2624 return orig(ui, r, *args, **kwargs)
2625
2610 def uisetup(ui):
2626 def uisetup(ui):
2611 extensions.wrapcommand(commands.table, 'import', mqimport)
2627 extensions.wrapcommand(commands.table, 'import', mqimport)
2628 for cmd in ('commit', 'export', 'incoming', 'log', 'outgoing', 'pull',
2629 'push', 'status', 'tag', 'tags', 'tip', 'update'):
2630 entry = extensions.wrapcommand(commands.table, cmd, mqcommand)
2631 entry[1].extend([('Q', 'mq', None, _("operate on patch repository"))])
2612
2632
2613 seriesopts = [('s', 'summary', None, _('print first line of patch header'))]
2633 seriesopts = [('s', 'summary', None, _('print first line of patch header'))]
2614
2634
General Comments 0
You need to be logged in to leave comments. Login now