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

Side by Side Diff: gclient.py

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

Powered by Google App Engine
This is Rietveld 408576698