# HG changeset patch # User Marcin Kasperski # Date 1446969172 -3600 # Node ID dac7580bfff23a8043ad12968cce2b2037085acc # Parent eced61373a74a1af691a0d5ce0b29fdd7b8dc150 Added incomingall and outgoingall diff -r eced61373a74 -r dac7580bfff2 allpaths.py --- a/allpaths.py Sun Nov 08 08:50:25 2015 +0100 +++ b/allpaths.py Sun Nov 08 08:52:52 2015 +0100 @@ -44,25 +44,42 @@ _iter_over_paths(mercurial.commands.pull, ui, repo, **opts) +def incomingall(ui, repo, **opts): + """execute incoming on multiple paths""" + _iter_over_paths(mercurial.commands.incoming, ui, repo, **opts) + + +def outgoingall(ui, repo, **opts): + """execute outgoing on multiple paths""" + _iter_over_paths(mercurial.commands.outgoing, ui, repo, **opts) + + def _original_options(cmdname): """Gets list of given command options as specified in Mercurial core""" _, spec = mercurial.cmdutil.findcmd(cmdname, mercurial.commands.table) return spec[1] +EXT_OPTS = [ + ('g', 'group', 'paths', _('use a named group of paths')), + ('', 'ignore-errors', None, _('continue execution despite errors')), +] + cmdtable = { "pushall": ( pushall, - [ - ('g', 'group', 'paths', _('use a named group of paths')), - ('', 'ignore-errors', None, _('continue execution despite errors')), - ] + _original_options('push'), + EXT_OPTS + _original_options('push'), _('[-g GROUP] [--ignore-errors] ')), "pullall": ( pullall, - [ - ('g', 'group', 'paths', _('use a named group of paths')), - ('', 'ignore-errors', None, _('continue execution despite errors')), - ] + _original_options('pull'), + EXT_OPTS + _original_options('pull'), _('[-g GROUP] [--ignore-errors] ')), + "incomingall": ( + incomingall, + EXT_OPTS + _original_options('incoming'), + _('[-g GROUP] [--ignore-errors] ')), + "outgoingall": ( + outgoingall, + EXT_OPTS + _original_options('outgoing'), + _('[-g GROUP] [--ignore-errors] ')), }