Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: gclient.py

Issue 9600010: Add --ignore to gclient recurse (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index 0cfb26dd7d8a13d881157a833ef4da55f0a7bb2a..3a4622ef6add43b60d7ef754ef522c637927ebaa 100644
--- a/gclient.py
+++ b/gclient.py
@@ -578,8 +578,12 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
if parsed_url:
env['GCLIENT_URL'] = parsed_url
if os.path.isdir(cwd):
- gclient_utils.CheckCallAndFilter(
- args, cwd=cwd, env=env, print_stdout=True)
+ try:
+ gclient_utils.CheckCallAndFilter(
+ args, cwd=cwd, env=env, print_stdout=True)
+ except subprocess2.CalledProcessError:
+ if not options.ignore:
+ raise
else:
print >> sys.stderr, 'Skipped missing %s' % cwd
@@ -1154,6 +1158,8 @@ def CMDrecurse(parser, args):
parser.disable_interspersed_args()
parser.add_option('-s', '--scm', action='append', default=[],
help='choose scm types to operate upon')
+ parser.add_option('-i', '--ignore', action='store_true',
+ help='continue processing in case of non zero return code')
options, args = parser.parse_args(args)
if not args:
print >> sys.stderr, 'Need to supply a command!'
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698