annotate mercurial_all_paths.py @ 56:1015f8eaa5ea

Added tag 1.0.0 for changeset 5cc338ed3842
author Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
date Sun, 25 Sep 2016 22:38:03 +0200
parents 55469dbb19c4
children 95b5ba2cd363
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
47
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
1 # -*- coding: utf-8 -*-
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
2 #
0
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3 # allpaths.py - execute commands on multiple paths
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
4 #
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
5 # This software may be used and distributed according to the terms of
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6 # the GNU General Public License version 2 or any later version.
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
8 '''execute commands on multiple paths'''
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
9
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
10 import mercurial.util
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
11 import mercurial.commands
7
1ea915867337 Standard push options are imported from mercurial, not copied here.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 6
diff changeset
12 import mercurial.cmdutil
0
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
13 from mercurial.i18n import _
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
14
34
7500a4ecb935 Preliminary steps towards tests (tox.ini, would-be testedwith decl)
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 31
diff changeset
15 # pylint:disable=invalid-name,broad-except,line-too-long
0
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
16
47
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
17 def _find_all_paths(ui, skip_ignored=False, sort_by_priority=False):
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
18 """
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
19 Finds all paths defined for repo
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
20 :return: list of pairs (alias, path)
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
21 """
48
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
22 paths = ui.configitems("paths")
47
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
23 if not paths:
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
24 raise mercurial.util.Abort(_('No paths defined for repository'))
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
25
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
26 if skip_ignored:
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
27 ignored = ui.configlist("all_paths", "ignore")
48
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
28 if ignored:
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
29 paths = [(alias, path) for alias, path in paths if alias not in ignored]
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
30 if not paths:
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
31 raise mercurial.util.Abort(_('All paths defined for this repository are ignored'))
47
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
32
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
33 if sort_by_priority:
48
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
34 prior = ui.configlist("all_paths", "prioritize")
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
35 if prior:
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
36 prior_val = {}
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
37 for idx, item in enumerate(prior):
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
38 prior_val[item] = idx
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
39 higher = len(prior)
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
40 paths.sort(key = lambda it: prior_val.get(it[0], higher))
00995da9c204 Implemented priorities, fixed bugs in ignoring, both should work.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 47
diff changeset
41
47
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
42 return paths
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
43
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
44 def _find_paths(ui, group=None):
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
45 """
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
46 Finds and returns all paths defined in given group, or all paths
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
47 (sans config) if group is not specified.
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
48
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
49 :param ui: repository ui
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
50 :param group: group name or None for all paths
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
51 :return: list of pairs (alias, path)
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
52 """
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
53 if not group:
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
54 return _find_all_paths(ui, skip_ignored=True, sort_by_priority=True)
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
55
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
56 # „Modern” syntax
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
57 grp_def = ui.configlist("all_paths", "group." + group)
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
58 if grp_def:
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
59 all_paths = dict(_find_all_paths(ui))
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
60 paths = []
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
61 for item in grp_def:
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
62 if item in all_paths:
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
63 paths.append((item, all_paths[item]))
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
64 if not paths:
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
65 raise mercurial.util.Abort(_('None of the paths from group %s is defined in this repository') % group)
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
66
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
67 return paths
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
68
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
69 # „Legacy” syntax, used also for all paths
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
70 paths = ui.configitems(group)
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
71 if not paths:
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
72 raise mercurial.util.Abort(_('No paths defined in section %s') % group)
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
73 return paths
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
74
8
eced61373a74 Added pullall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 7
diff changeset
75
44
2d6c7e0c1b2f Added newline between successive items output
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 41
diff changeset
76 def _iter_over_paths(command, ui, repo, add_sep, **opts):
8
eced61373a74 Added pullall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 7
diff changeset
77 """execute given command on multiple paths"""
6
b1d440f1027a (internal) Changed the way in which extension options are separated:
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 1
diff changeset
78 # Extract our options and filter them out
47
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
79 group = opts.pop('group', None)
6
b1d440f1027a (internal) Changed the way in which extension options are separated:
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 1
diff changeset
80 ignore_errors = opts.pop('ignore_errors', None)
0
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
81
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
82 # Get the paths to push to.
47
916b05f73b53 preliminary impl of groups
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 45
diff changeset
83 paths = _find_paths(ui, group)
0
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
84
12
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
85 # Used to avoid handling duplicate paths twice
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
86 handled = {}
44
2d6c7e0c1b2f Added newline between successive items output
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 41
diff changeset
87 # Used to add extra newline between items
2d6c7e0c1b2f Added newline between successive items output
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 41
diff changeset
88 sep = ''
12
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
89
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
90 # Act!
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
91 for alias, path in paths:
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
92 if path in handled:
45
237dd8c4fe78 Finalized separators
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 44
diff changeset
93 ui.status(sep + _("Skipping %s as path %s was already handled\n") % (alias, handled[path]))
237dd8c4fe78 Finalized separators
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 44
diff changeset
94 sep = '\n'
12
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
95 else:
44
2d6c7e0c1b2f Added newline between successive items output
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 41
diff changeset
96 ui.status(sep)
2d6c7e0c1b2f Added newline between successive items output
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 41
diff changeset
97 sep = '\n' if add_sep else ''
12
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
98 handled[path] = alias
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
99 try:
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
100 command(ui, repo, path, **opts)
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
101 except Exception as e:
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
102 if not ignore_errors:
bed42905e871 Avoiding doing pull or push twice in case some path has more than one
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 11
diff changeset
103 raise
31
9d595bda6f2f Fixed buggy information printed on errors:
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 13
diff changeset
104 ui.warn(_('error handling %s: %s\n') % (alias, e))
44
2d6c7e0c1b2f Added newline between successive items output
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 41
diff changeset
105 sep = '\n'
8
eced61373a74 Added pullall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 7
diff changeset
106
eced61373a74 Added pullall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 7
diff changeset
107 def pushall(ui, repo, **opts):
35
6dae5ed53f22 Setting up tests for 3.8 (not yet really tested)
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 34
diff changeset
108 """execute push on multiple paths"""
44
2d6c7e0c1b2f Added newline between successive items output
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 41
diff changeset
109 _iter_over_paths(mercurial.commands.push, ui, repo, True, **opts)
8
eced61373a74 Added pullall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 7
diff changeset
110
eced61373a74 Added pullall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 7
diff changeset
111
eced61373a74 Added pullall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 7
diff changeset
112 def pullall(ui, repo, **opts):
35
6dae5ed53f22 Setting up tests for 3.8 (not yet really tested)
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 34
diff changeset
113 """execute pull on multiple paths"""
44
2d6c7e0c1b2f Added newline between successive items output
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 41
diff changeset
114 _iter_over_paths(mercurial.commands.pull, ui, repo, True, **opts)
0
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
115
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
116
9
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
117 def incomingall(ui, repo, **opts):
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
118 """execute incoming on multiple paths"""
44
2d6c7e0c1b2f Added newline between successive items output
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 41
diff changeset
119 _iter_over_paths(mercurial.commands.incoming, ui, repo, False, **opts)
9
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
120
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
121
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
122 def outgoingall(ui, repo, **opts):
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
123 """execute outgoing on multiple paths"""
44
2d6c7e0c1b2f Added newline between successive items output
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 41
diff changeset
124 _iter_over_paths(mercurial.commands.outgoing, ui, repo, False, **opts)
9
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
125
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
126
7
1ea915867337 Standard push options are imported from mercurial, not copied here.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 6
diff changeset
127 def _original_options(cmdname):
1ea915867337 Standard push options are imported from mercurial, not copied here.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 6
diff changeset
128 """Gets list of given command options as specified in Mercurial core"""
1ea915867337 Standard push options are imported from mercurial, not copied here.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 6
diff changeset
129 _, spec = mercurial.cmdutil.findcmd(cmdname, mercurial.commands.table)
1ea915867337 Standard push options are imported from mercurial, not copied here.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 6
diff changeset
130 return spec[1]
1ea915867337 Standard push options are imported from mercurial, not copied here.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 6
diff changeset
131
1ea915867337 Standard push options are imported from mercurial, not copied here.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 6
diff changeset
132
9
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
133 EXT_OPTS = [
50
55469dbb19c4 testfixes
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 48
diff changeset
134 ('g', 'group', '', _('use a named group instead of all paths')),
9
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
135 ('', 'ignore-errors', None, _('continue execution despite errors')),
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
136 ]
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
137
0
6f92e4c814d1 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
138 cmdtable = {
6
b1d440f1027a (internal) Changed the way in which extension options are separated:
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 1
diff changeset
139 "pushall": (
b1d440f1027a (internal) Changed the way in which extension options are separated:
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 1
diff changeset
140 pushall,
9
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
141 EXT_OPTS + _original_options('push'),
7
1ea915867337 Standard push options are imported from mercurial, not copied here.
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 6
diff changeset
142 _('[-g GROUP] [--ignore-errors] <push options>')),
8
eced61373a74 Added pullall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 7
diff changeset
143 "pullall": (
eced61373a74 Added pullall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 7
diff changeset
144 pullall,
9
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
145 EXT_OPTS + _original_options('pull'),
8
eced61373a74 Added pullall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 7
diff changeset
146 _('[-g GROUP] [--ignore-errors] <pull options>')),
41
b8a7342fbf23 outgoingall and incomingall can't handle -g as it is already taken,
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 35
diff changeset
147 # For incoming and outgoing -g is taken (--git diff format)
9
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
148 "incomingall": (
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
149 incomingall,
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
150 EXT_OPTS + _original_options('incoming'),
41
b8a7342fbf23 outgoingall and incomingall can't handle -g as it is already taken,
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 35
diff changeset
151 _('[--group GROUP] [--ignore-errors] <incoming options>')),
9
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
152 "outgoingall": (
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
153 outgoingall,
dac7580bfff2 Added incomingall and outgoingall
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 8
diff changeset
154 EXT_OPTS + _original_options('outgoing'),
41
b8a7342fbf23 outgoingall and incomingall can't handle -g as it is already taken,
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 35
diff changeset
155 _('[--group GROUP] [--ignore-errors] <outgoing options>')),
6
b1d440f1027a (internal) Changed the way in which extension options are separated:
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 1
diff changeset
156 }
34
7500a4ecb935 Preliminary steps towards tests (tox.ini, would-be testedwith decl)
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 31
diff changeset
157
35
6dae5ed53f22 Setting up tests for 3.8 (not yet really tested)
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 34
diff changeset
158 testedwith = '2.7 2.9 3.0 3.3 3.6 3.7 3.8'
34
7500a4ecb935 Preliminary steps towards tests (tox.ini, would-be testedwith decl)
Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
parents: 31
diff changeset
159 buglink = 'https://bitbucket.org/Mekk/mercurial-all_paths/issues'