summaryrefslogtreecommitdiffstats
path: root/subcmds/forall.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/forall.py')
-rw-r--r--subcmds/forall.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py
index 97067605..5d2be91f 100644
--- a/subcmds/forall.py
+++ b/subcmds/forall.py
@@ -28,10 +28,10 @@ from command import Command, MirrorSafeCommand
28import platform_utils 28import platform_utils
29 29
30_CAN_COLOR = [ 30_CAN_COLOR = [
31 'branch', 31 'branch',
32 'diff', 32 'diff',
33 'grep', 33 'grep',
34 'log', 34 'log',
35] 35]
36 36
37 37
@@ -170,14 +170,14 @@ without iterating through the remaining projects.
170 else: 170 else:
171 lrev = None 171 lrev = None
172 return { 172 return {
173 'name': project.name, 173 'name': project.name,
174 'relpath': project.relpath, 174 'relpath': project.relpath,
175 'remote_name': project.remote.name, 175 'remote_name': project.remote.name,
176 'lrev': lrev, 176 'lrev': lrev,
177 'rrev': project.revisionExpr, 177 'rrev': project.revisionExpr,
178 'annotations': dict((a.name, a.value) for a in project.annotations), 178 'annotations': dict((a.name, a.value) for a in project.annotations),
179 'gitdir': project.gitdir, 179 'gitdir': project.gitdir,
180 'worktree': project.worktree, 180 'worktree': project.worktree,
181 } 181 }
182 182
183 def ValidateOptions(self, opt, args): 183 def ValidateOptions(self, opt, args):
@@ -196,8 +196,8 @@ without iterating through the remaining projects.
196 cmd.extend(opt.command[1:]) 196 cmd.extend(opt.command[1:])
197 197
198 if opt.project_header \ 198 if opt.project_header \
199 and not shell \ 199 and not shell \
200 and cmd[0] == 'git': 200 and cmd[0] == 'git':
201 # If this is a direct git command that can enable colorized 201 # If this is a direct git command that can enable colorized
202 # output and the user prefers coloring, add --color into the 202 # output and the user prefers coloring, add --color into the
203 # command line because we are going to wrap the command into 203 # command line because we are going to wrap the command into
@@ -220,7 +220,7 @@ without iterating through the remaining projects.
220 220
221 smart_sync_manifest_name = "smart_sync_override.xml" 221 smart_sync_manifest_name = "smart_sync_override.xml"
222 smart_sync_manifest_path = os.path.join( 222 smart_sync_manifest_path = os.path.join(
223 self.manifest.manifestProject.worktree, smart_sync_manifest_name) 223 self.manifest.manifestProject.worktree, smart_sync_manifest_name)
224 224
225 if os.path.isfile(smart_sync_manifest_path): 225 if os.path.isfile(smart_sync_manifest_path):
226 self.manifest.Override(smart_sync_manifest_path) 226 self.manifest.Override(smart_sync_manifest_path)
@@ -238,8 +238,8 @@ without iterating through the remaining projects.
238 try: 238 try:
239 config = self.manifest.manifestProject.config 239 config = self.manifest.manifestProject.config
240 results_it = pool.imap( 240 results_it = pool.imap(
241 DoWorkWrapper, 241 DoWorkWrapper,
242 self.ProjectArgs(projects, mirror, opt, cmd, shell, config)) 242 self.ProjectArgs(projects, mirror, opt, cmd, shell, config))
243 pool.close() 243 pool.close()
244 for r in results_it: 244 for r in results_it:
245 rc = rc or r 245 rc = rc or r
@@ -253,7 +253,7 @@ without iterating through the remaining projects.
253 except Exception as e: 253 except Exception as e:
254 # Catch any other exceptions raised 254 # Catch any other exceptions raised
255 print('Got an error, terminating the pool: %s: %s' % 255 print('Got an error, terminating the pool: %s: %s' %
256 (type(e).__name__, e), 256 (type(e).__name__, e),
257 file=sys.stderr) 257 file=sys.stderr)
258 pool.terminate() 258 pool.terminate()
259 rc = rc or getattr(e, 'errno', 1) 259 rc = rc or getattr(e, 'errno', 1)
@@ -268,7 +268,7 @@ without iterating through the remaining projects.
268 project = self._SerializeProject(p) 268 project = self._SerializeProject(p)
269 except Exception as e: 269 except Exception as e:
270 print('Project list error on project %s: %s: %s' % 270 print('Project list error on project %s: %s: %s' %
271 (p.name, type(e).__name__, e), 271 (p.name, type(e).__name__, e),
272 file=sys.stderr) 272 file=sys.stderr)
273 return 273 return
274 except KeyboardInterrupt: 274 except KeyboardInterrupt:
@@ -331,7 +331,7 @@ def DoWork(project, mirror, opt, cmd, shell, cnt, config):
331 if opt.ignore_missing: 331 if opt.ignore_missing:
332 return 0 332 return 0
333 if ((opt.project_header and opt.verbose) 333 if ((opt.project_header and opt.verbose)
334 or not opt.project_header): 334 or not opt.project_header):
335 print('skipping %s/' % project['relpath'], file=sys.stderr) 335 print('skipping %s/' % project['relpath'], file=sys.stderr)
336 return 1 336 return 1
337 337