| OLD | NEW |
| 1 # Copyright 2016 The LUCI Authors. All rights reserved. | 1 # Copyright 2017 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 |
| 11 import shutil | 11 import shutil |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 595 |
| 596 | 596 |
| 597 def add_subparser(parser): | 597 def add_subparser(parser): |
| 598 helpstr = 'Fetch and update dependencies but take no other action.' |
| 599 |
| 598 fetch_p = parser.add_parser( | 600 fetch_p = parser.add_parser( |
| 599 'fetch', | 601 'fetch', help=helpstr, description=helpstr) |
| 600 description='Fetch and update dependencies.') | |
| 601 | 602 |
| 602 def postprocess_func(parser, args): | 603 def postprocess_func(parser, args): |
| 603 if args.no_fetch: | 604 if args.no_fetch: |
| 604 parser.error('--no-fetch doesn\'t make sense with fetch command') | 605 parser.error('--no-fetch doesn\'t make sense with fetch command') |
| 605 | 606 |
| 606 fetch_p.set_defaults( | 607 fetch_p.set_defaults( |
| 607 command='fetch', | 608 command='fetch', |
| 608 # fetch action is implied by recipes.py | 609 # fetch action is implied by recipes.py |
| 609 func=(lambda package_deps, engine_flags: 0), | 610 func=(lambda package_deps, engine_flags: 0), |
| 610 postprocess_func=postprocess_func, | 611 postprocess_func=postprocess_func, |
| 611 ) | 612 ) |
| OLD | NEW |