Mercurial > hg-allpaths
comparison 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 |
comparison
equal
deleted
inserted
replaced
8:eced61373a74 | 9:dac7580bfff2 |
---|---|
42 def pullall(ui, repo, **opts): | 42 def pullall(ui, repo, **opts): |
43 """execute push on multiple paths""" | 43 """execute push on multiple paths""" |
44 _iter_over_paths(mercurial.commands.pull, ui, repo, **opts) | 44 _iter_over_paths(mercurial.commands.pull, ui, repo, **opts) |
45 | 45 |
46 | 46 |
47 def incomingall(ui, repo, **opts): | |
48 """execute incoming on multiple paths""" | |
49 _iter_over_paths(mercurial.commands.incoming, ui, repo, **opts) | |
50 | |
51 | |
52 def outgoingall(ui, repo, **opts): | |
53 """execute outgoing on multiple paths""" | |
54 _iter_over_paths(mercurial.commands.outgoing, ui, repo, **opts) | |
55 | |
56 | |
47 def _original_options(cmdname): | 57 def _original_options(cmdname): |
48 """Gets list of given command options as specified in Mercurial core""" | 58 """Gets list of given command options as specified in Mercurial core""" |
49 _, spec = mercurial.cmdutil.findcmd(cmdname, mercurial.commands.table) | 59 _, spec = mercurial.cmdutil.findcmd(cmdname, mercurial.commands.table) |
50 return spec[1] | 60 return spec[1] |
51 | 61 |
52 | 62 |
63 EXT_OPTS = [ | |
64 ('g', 'group', 'paths', _('use a named group of paths')), | |
65 ('', 'ignore-errors', None, _('continue execution despite errors')), | |
66 ] | |
67 | |
53 cmdtable = { | 68 cmdtable = { |
54 "pushall": ( | 69 "pushall": ( |
55 pushall, | 70 pushall, |
56 [ | 71 EXT_OPTS + _original_options('push'), |
57 ('g', 'group', 'paths', _('use a named group of paths')), | |
58 ('', 'ignore-errors', None, _('continue execution despite errors')), | |
59 ] + _original_options('push'), | |
60 _('[-g GROUP] [--ignore-errors] <push options>')), | 72 _('[-g GROUP] [--ignore-errors] <push options>')), |
61 "pullall": ( | 73 "pullall": ( |
62 pullall, | 74 pullall, |
63 [ | 75 EXT_OPTS + _original_options('pull'), |
64 ('g', 'group', 'paths', _('use a named group of paths')), | |
65 ('', 'ignore-errors', None, _('continue execution despite errors')), | |
66 ] + _original_options('pull'), | |
67 _('[-g GROUP] [--ignore-errors] <pull options>')), | 76 _('[-g GROUP] [--ignore-errors] <pull options>')), |
77 "incomingall": ( | |
78 incomingall, | |
79 EXT_OPTS + _original_options('incoming'), | |
80 _('[-g GROUP] [--ignore-errors] <incoming options>')), | |
81 "outgoingall": ( | |
82 outgoingall, | |
83 EXT_OPTS + _original_options('outgoing'), | |
84 _('[-g GROUP] [--ignore-errors] <outgoing options>')), | |
68 } | 85 } |