| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """A wrapper script to manage a set of client modules in different SCM. | 6 """A wrapper script to manage a set of client modules in different SCM. |
| 7 | 7 |
| 8 This script is intended to be used to help basic management of client | 8 This script is intended to be used to help basic management of client |
| 9 program sources residing in one or more Subversion modules and Git | 9 program sources residing in one or more Subversion modules and Git |
| 10 repositories, along with other modules it depends on, also in Subversion or Git, | 10 repositories, along with other modules it depends on, also in Subversion or Git, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 118 |
| 119 usage: gclient %(cmd)s [options] [--] [SCM update options/args] | 119 usage: gclient %(cmd)s [options] [--] [SCM update options/args] |
| 120 | 120 |
| 121 Valid options: | 121 Valid options: |
| 122 --force : force update even for unchanged modules | 122 --force : force update even for unchanged modules |
| 123 --nohooks : don't run the hooks after the update is complete | 123 --nohooks : don't run the hooks after the update is complete |
| 124 --revision SOLUTION@REV : update given solution to specified revision | 124 --revision SOLUTION@REV : update given solution to specified revision |
| 125 --deps PLATFORM(S) : sync deps for the given platform(s), or 'all' | 125 --deps PLATFORM(S) : sync deps for the given platform(s), or 'all' |
| 126 --verbose : output additional diagnostics | 126 --verbose : output additional diagnostics |
| 127 --head : update to latest revision, instead of last good revi
sion | 127 --head : update to latest revision, instead of last good revi
sion |
| 128 --reset : resets any local changes before updating (git only) |
| 128 | 129 |
| 129 Examples: | 130 Examples: |
| 130 gclient %(cmd)s | 131 gclient %(cmd)s |
| 131 update files from SCM according to current configuration, | 132 update files from SCM according to current configuration, |
| 132 *for modules which have changed since last update or sync* | 133 *for modules which have changed since last update or sync* |
| 133 gclient %(cmd)s --force | 134 gclient %(cmd)s --force |
| 134 update files from SCM according to current configuration, for | 135 update files from SCM according to current configuration, for |
| 135 all modules (useful for recovering files deleted from local copy) | 136 all modules (useful for recovering files deleted from local copy) |
| 136 gclient %(cmd)s --revision src@31000 | 137 gclient %(cmd)s --revision src@31000 |
| 137 update src directory to r31000 | 138 update src directory to r31000 |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 metavar="REV", default=[], | 1123 metavar="REV", default=[], |
| 1123 help=("(update/sync only) sync to a specific " | 1124 help=("(update/sync only) sync to a specific " |
| 1124 "revision, can be used multiple times for " | 1125 "revision, can be used multiple times for " |
| 1125 "each solution, e.g. --revision=src@123, " | 1126 "each solution, e.g. --revision=src@123, " |
| 1126 "--revision=internal@32")) | 1127 "--revision=internal@32")) |
| 1127 option_parser.add_option("", "--deps", default=None, dest="deps_os", | 1128 option_parser.add_option("", "--deps", default=None, dest="deps_os", |
| 1128 metavar="OS_LIST", | 1129 metavar="OS_LIST", |
| 1129 help=("(update/sync only) sync deps for the " | 1130 help=("(update/sync only) sync deps for the " |
| 1130 "specified (comma-separated) platform(s); " | 1131 "specified (comma-separated) platform(s); " |
| 1131 "'all' will sync all platforms")) | 1132 "'all' will sync all platforms")) |
| 1133 option_parser.add_option("", "--reset", action="store_true", default=False, |
| 1134 help=("(update/sync only) resets any local changes " |
| 1135 "before updating (git only)")) |
| 1132 option_parser.add_option("", "--spec", default=None, | 1136 option_parser.add_option("", "--spec", default=None, |
| 1133 help=("(config only) create a gclient file " | 1137 help=("(config only) create a gclient file " |
| 1134 "containing the provided string")) | 1138 "containing the provided string")) |
| 1135 option_parser.add_option("-v", "--verbose", action="count", default=0, | 1139 option_parser.add_option("-v", "--verbose", action="count", default=0, |
| 1136 help="produce additional output for diagnostics") | 1140 help="produce additional output for diagnostics") |
| 1137 option_parser.add_option("", "--manually_grab_svn_rev", action="store_true", | 1141 option_parser.add_option("", "--manually_grab_svn_rev", action="store_true", |
| 1138 default=False, | 1142 default=False, |
| 1139 help="Skip svn up whenever possible by requesting " | 1143 help="Skip svn up whenever possible by requesting " |
| 1140 "actual HEAD revision from the repository") | 1144 "actual HEAD revision from the repository") |
| 1141 option_parser.add_option("", "--head", action="store_true", default=False, | 1145 option_parser.add_option("", "--head", action="store_true", default=False, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1180 | 1184 |
| 1181 if "__main__" == __name__: | 1185 if "__main__" == __name__: |
| 1182 try: | 1186 try: |
| 1183 result = Main(sys.argv) | 1187 result = Main(sys.argv) |
| 1184 except gclient_utils.Error, e: | 1188 except gclient_utils.Error, e: |
| 1185 print >> sys.stderr, "Error: %s" % str(e) | 1189 print >> sys.stderr, "Error: %s" % str(e) |
| 1186 result = 1 | 1190 result = 1 |
| 1187 sys.exit(result) | 1191 sys.exit(result) |
| 1188 | 1192 |
| 1189 # vim: ts=2:sw=2:tw=80:et: | 1193 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |