Mercurial > hg-allpaths
diff allpaths.py @ 9:dac7580bfff2
Added incomingall and outgoingall
author | Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl> |
---|---|
date | Sun, 08 Nov 2015 08:52:52 +0100 |
parents | eced61373a74 |
children | e702b63eea3f |
line wrap: on
line diff
--- 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] <push options>')), "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] <pull options>')), + "incomingall": ( + incomingall, + EXT_OPTS + _original_options('incoming'), + _('[-g GROUP] [--ignore-errors] <incoming options>')), + "outgoingall": ( + outgoingall, + EXT_OPTS + _original_options('outgoing'), + _('[-g GROUP] [--ignore-errors] <outgoing options>')), }