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

Side by Side Diff: gclient.py

Issue 257023: Modify the output of gclient update, gclient status to only print out... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 11 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | gclient_scm.py » ('j') | gclient_scm.py » ('J')
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 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 Raises: 885 Raises:
886 Error: if client isn't configured properly. 886 Error: if client isn't configured properly.
887 """ 887 """
888 client = GClient.LoadCurrentConfig(options) 888 client = GClient.LoadCurrentConfig(options)
889 if not client: 889 if not client:
890 raise Error("client not configured; see 'gclient config'") 890 raise Error("client not configured; see 'gclient config'")
891 if options.verbose: 891 if options.verbose:
892 # Print out the .gclient file. This is longer than if we just printed the 892 # Print out the .gclient file. This is longer than if we just printed the
893 # client dict, but more legible, and it might contain helpful comments. 893 # client dict, but more legible, and it might contain helpful comments.
894 print(client.ConfigContent()) 894 print(client.ConfigContent())
895 options.verbose = True
M-A Ruel 2009/10/02 01:23:10 I really wonder why I did that.
896 return client.RunOnDeps('cleanup', args) 895 return client.RunOnDeps('cleanup', args)
897 896
898 897
899 def DoConfig(options, args): 898 def DoConfig(options, args):
900 """Handle the config subcommand. 899 """Handle the config subcommand.
901 900
902 Args: 901 Args:
903 options: If options.spec set, a string providing contents of config file. 902 options: If options.spec set, a string providing contents of config file.
904 args: The command line args. If spec is not set, 903 args: The command line args. If spec is not set,
905 then args[0] is a string URL to get for config file. 904 then args[0] is a string URL to get for config file.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 Raises: 963 Raises:
965 Error: if client isn't configured properly. 964 Error: if client isn't configured properly.
966 """ 965 """
967 client = GClient.LoadCurrentConfig(options) 966 client = GClient.LoadCurrentConfig(options)
968 if not client: 967 if not client:
969 raise Error("client not configured; see 'gclient config'") 968 raise Error("client not configured; see 'gclient config'")
970 if options.verbose: 969 if options.verbose:
971 # Print out the .gclient file. This is longer than if we just printed the 970 # Print out the .gclient file. This is longer than if we just printed the
972 # client dict, but more legible, and it might contain helpful comments. 971 # client dict, but more legible, and it might contain helpful comments.
973 print(client.ConfigContent()) 972 print(client.ConfigContent())
974 options.verbose = True
975 return client.RunOnDeps('pack', args) 973 return client.RunOnDeps('pack', args)
976 974
977 975
978 def DoStatus(options, args): 976 def DoStatus(options, args):
979 """Handle the status subcommand. 977 """Handle the status subcommand.
980 978
981 Raises: 979 Raises:
982 Error: if client isn't configured properly. 980 Error: if client isn't configured properly.
983 """ 981 """
984 client = GClient.LoadCurrentConfig(options) 982 client = GClient.LoadCurrentConfig(options)
985 if not client: 983 if not client:
986 raise Error("client not configured; see 'gclient config'") 984 raise Error("client not configured; see 'gclient config'")
987 if options.verbose: 985 if options.verbose:
988 # Print out the .gclient file. This is longer than if we just printed the 986 # Print out the .gclient file. This is longer than if we just printed the
989 # client dict, but more legible, and it might contain helpful comments. 987 # client dict, but more legible, and it might contain helpful comments.
990 print(client.ConfigContent()) 988 print(client.ConfigContent())
991 options.verbose = True
992 return client.RunOnDeps('status', args) 989 return client.RunOnDeps('status', args)
993 990
994 991
995 def DoUpdate(options, args): 992 def DoUpdate(options, args):
996 """Handle the update and sync subcommands. 993 """Handle the update and sync subcommands.
997 994
998 Raises: 995 Raises:
999 Error: if client isn't configured properly. 996 Error: if client isn't configured properly.
1000 """ 997 """
1001 client = GClient.LoadCurrentConfig(options) 998 client = GClient.LoadCurrentConfig(options)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 Raises: 1033 Raises:
1037 Error: if client isn't configured properly. 1034 Error: if client isn't configured properly.
1038 """ 1035 """
1039 client = GClient.LoadCurrentConfig(options) 1036 client = GClient.LoadCurrentConfig(options)
1040 if not client: 1037 if not client:
1041 raise Error("client not configured; see 'gclient config'") 1038 raise Error("client not configured; see 'gclient config'")
1042 if options.verbose: 1039 if options.verbose:
1043 # Print out the .gclient file. This is longer than if we just printed the 1040 # Print out the .gclient file. This is longer than if we just printed the
1044 # client dict, but more legible, and it might contain helpful comments. 1041 # client dict, but more legible, and it might contain helpful comments.
1045 print(client.ConfigContent()) 1042 print(client.ConfigContent())
1046 options.verbose = True
1047 return client.RunOnDeps('diff', args) 1043 return client.RunOnDeps('diff', args)
1048 1044
1049 1045
1050 def DoRevert(options, args): 1046 def DoRevert(options, args):
1051 """Handle the revert subcommand. 1047 """Handle the revert subcommand.
1052 1048
1053 Raises: 1049 Raises:
1054 Error: if client isn't configured properly. 1050 Error: if client isn't configured properly.
1055 """ 1051 """
1056 client = GClient.LoadCurrentConfig(options) 1052 client = GClient.LoadCurrentConfig(options)
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 option_parser.add_option("", "--deps", default=None, dest="deps_os", 1132 option_parser.add_option("", "--deps", default=None, dest="deps_os",
1137 metavar="OS_LIST", 1133 metavar="OS_LIST",
1138 help=("(update/sync only) sync deps for the " 1134 help=("(update/sync only) sync deps for the "
1139 "specified (comma-separated) platform(s); " 1135 "specified (comma-separated) platform(s); "
1140 "'all' will sync all platforms")) 1136 "'all' will sync all platforms"))
1141 option_parser.add_option("", "--spec", default=None, 1137 option_parser.add_option("", "--spec", default=None,
1142 help=("(config only) create a gclient file " 1138 help=("(config only) create a gclient file "
1143 "containing the provided string")) 1139 "containing the provided string"))
1144 option_parser.add_option("", "--verbose", action="store_true", default=False, 1140 option_parser.add_option("", "--verbose", action="store_true", default=False,
1145 help="produce additional output for diagnostics") 1141 help="produce additional output for diagnostics")
1146 option_parser.add_option("", "--manually_grab_svn_rev", action="store_true",
1147 default=False,
1148 help="Skip svn up whenever possible by requesting "
1149 "actual HEAD revision from the repository")
1150 option_parser.add_option("", "--head", action="store_true", default=False, 1142 option_parser.add_option("", "--head", action="store_true", default=False,
1151 help=("skips any safesync_urls specified in " 1143 help=("skips any safesync_urls specified in "
1152 "configured solutions")) 1144 "configured solutions"))
1153 option_parser.add_option("", "--delete_unversioned_trees", 1145 option_parser.add_option("", "--delete_unversioned_trees",
1154 action="store_true", default=False, 1146 action="store_true", default=False,
1155 help=("on update, delete any unexpected " 1147 help=("on update, delete any unexpected "
1156 "unversioned trees that are in the checkout")) 1148 "unversioned trees that are in the checkout"))
1157 1149
1158 if len(argv) < 2: 1150 if len(argv) < 2:
1159 # Users don't need to be told to use the 'help' command. 1151 # Users don't need to be told to use the 'help' command.
(...skipping 29 matching lines...) Expand all
1189 1181
1190 if "__main__" == __name__: 1182 if "__main__" == __name__:
1191 try: 1183 try:
1192 result = Main(sys.argv) 1184 result = Main(sys.argv)
1193 except Error, e: 1185 except Error, e:
1194 print >> sys.stderr, "Error: %s" % str(e) 1186 print >> sys.stderr, "Error: %s" % str(e)
1195 result = 1 1187 result = 1
1196 sys.exit(result) 1188 sys.exit(result)
1197 1189
1198 # vim: ts=2:sw=2:tw=80:et: 1190 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | gclient_scm.py » ('j') | gclient_scm.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698