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

Side by Side Diff: gclient.py

Issue 523099: Reduce log level to sanity. (Closed)
Patch Set: Created 10 years, 11 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright 2008 Google Inc. All Rights Reserved. 3 # Copyright 2008 Google Inc. All Rights Reserved.
4 # 4 #
5 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License. 6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at 7 # You may obtain a copy of the License at
8 # 8 #
9 # http://www.apache.org/licenses/LICENSE-2.0 9 # http://www.apache.org/licenses/LICENSE-2.0
10 # 10 #
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 "each solution, e.g. --revision=src@123, " 1133 "each solution, e.g. --revision=src@123, "
1134 "--revision=internal@32")) 1134 "--revision=internal@32"))
1135 option_parser.add_option("", "--deps", default=None, dest="deps_os", 1135 option_parser.add_option("", "--deps", default=None, dest="deps_os",
1136 metavar="OS_LIST", 1136 metavar="OS_LIST",
1137 help=("(update/sync only) sync deps for the " 1137 help=("(update/sync only) sync deps for the "
1138 "specified (comma-separated) platform(s); " 1138 "specified (comma-separated) platform(s); "
1139 "'all' will sync all platforms")) 1139 "'all' will sync all platforms"))
1140 option_parser.add_option("", "--spec", default=None, 1140 option_parser.add_option("", "--spec", default=None,
1141 help=("(config only) create a gclient file " 1141 help=("(config only) create a gclient file "
1142 "containing the provided string")) 1142 "containing the provided string"))
1143 option_parser.add_option("", "--verbose", action="store_true", default=False, 1143 option_parser.add_option("-v", "--verbose", action="count", default=0,
1144 help="produce additional output for diagnostics") 1144 help="produce additional output for diagnostics")
1145 option_parser.add_option("", "--manually_grab_svn_rev", action="store_true", 1145 option_parser.add_option("", "--manually_grab_svn_rev", action="store_true",
1146 default=False, 1146 default=False,
1147 help="Skip svn up whenever possible by requesting " 1147 help="Skip svn up whenever possible by requesting "
1148 "actual HEAD revision from the repository") 1148 "actual HEAD revision from the repository")
1149 option_parser.add_option("", "--head", action="store_true", default=False, 1149 option_parser.add_option("", "--head", action="store_true", default=False,
1150 help=("skips any safesync_urls specified in " 1150 help=("skips any safesync_urls specified in "
1151 "configured solutions")) 1151 "configured solutions"))
1152 option_parser.add_option("", "--delete_unversioned_trees", 1152 option_parser.add_option("", "--delete_unversioned_trees",
1153 action="store_true", default=False, 1153 action="store_true", default=False,
(...skipping 13 matching lines...) Expand all
1167 if argv[1] == '--help': 1167 if argv[1] == '--help':
1168 argv[1] = 'help' 1168 argv[1] = 'help'
1169 1169
1170 command = argv[1] 1170 command = argv[1]
1171 options, args = option_parser.parse_args(argv[2:]) 1171 options, args = option_parser.parse_args(argv[2:])
1172 1172
1173 if len(argv) < 3 and command == "help": 1173 if len(argv) < 3 and command == "help":
1174 option_parser.print_help() 1174 option_parser.print_help()
1175 return 0 1175 return 0
1176 1176
1177 if options.verbose: 1177 if options.verbose > 1:
1178 logging.basicConfig(level=logging.DEBUG) 1178 logging.basicConfig(level=logging.DEBUG)
1179 1179
1180 # Files used for configuration and state saving. 1180 # Files used for configuration and state saving.
1181 options.config_filename = os.environ.get("GCLIENT_FILE", ".gclient") 1181 options.config_filename = os.environ.get("GCLIENT_FILE", ".gclient")
1182 options.entries_filename = ".gclient_entries" 1182 options.entries_filename = ".gclient_entries"
1183 options.deps_file = "DEPS" 1183 options.deps_file = "DEPS"
1184 1184
1185 options.platform = sys.platform 1185 options.platform = sys.platform
1186 return DispatchCommand(command, options, args) 1186 return DispatchCommand(command, options, args)
1187 1187
1188 1188
1189 if "__main__" == __name__: 1189 if "__main__" == __name__:
1190 try: 1190 try:
1191 result = Main(sys.argv) 1191 result = Main(sys.argv)
1192 except gclient_utils.Error, e: 1192 except gclient_utils.Error, e:
1193 print >> sys.stderr, "Error: %s" % str(e) 1193 print >> sys.stderr, "Error: %s" % str(e)
1194 result = 1 1194 result = 1
1195 sys.exit(result) 1195 sys.exit(result)
1196 1196
1197 # vim: ts=2:sw=2:tw=80:et: 1197 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« 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