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

Side by Side Diff: recipe_engine/fetch.py

Issue 2848443003: [recipes.py] add missing helpstrings, merge test subcommands into main parser. (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
« no previous file with comments | « recipe_engine/doc.py ('k') | recipe_engine/lint_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 )
OLDNEW
« no previous file with comments | « recipe_engine/doc.py ('k') | recipe_engine/lint_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698