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

Side by Side Diff: recipe_engine/fetch.py

Issue 2845783002: [recipes.py] Move fetch, lint and bundle parsers to separate modules. (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 # Copyright 2016 The LUCI Authors. All rights reserved. 1 # Copyright 2016 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 import calendar 5 import calendar
6 import httplib 6 import httplib
7 import json 7 import json
8 import logging 8 import logging
9 import os 9 import os
10 import re 10 import re
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 spec = json_format.Parse( 585 spec = json_format.Parse(
586 recipes_cfg_text, package_pb2.Package(), ignore_unknown_fields=True) 586 recipes_cfg_text, package_pb2.Package(), ignore_unknown_fields=True)
587 587
588 return CommitMetadata( 588 return CommitMetadata(
589 revision, 589 revision,
590 rev_json.author_email, 590 rev_json.author_email,
591 rev_json.commit_timestamp, 591 rev_json.commit_timestamp,
592 rev_json.message_lines, 592 rev_json.message_lines,
593 spec, 593 spec,
594 has_interesting_changes(spec, rev_json.changed_files)) 594 has_interesting_changes(spec, rev_json.changed_files))
595
596
597 def add_subparser(parser):
598 fetch_p = parser.add_parser(
599 'fetch',
600 description='Fetch and update dependencies.')
601
602 def postprocess_func(parser, args):
603 if args.no_fetch:
604 parser.error('--no-fetch doesn\'t make sense with fetch command')
605
606 fetch_p.set_defaults(
607 command='fetch',
608 # fetch action is implied by recipes.py
609 func=(lambda package_deps, engine_flags: 0),
610 postprocess_func=postprocess_func,
611 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698