Add --upstream option to gclient to scrape git checkouts back to upstream state.
This will be used on the bots when calling apply_patch, which commits to git
repos.
R=dpranke@chromium.org,szager@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/18006002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@209040 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient.py b/gclient.py
index d6741fd..1f4801b 100755
--- a/gclient.py
+++ b/gclient.py
@@ -1541,6 +1541,8 @@
parser.add_option('-m', '--manually_grab_svn_rev', action='store_true',
help='Skip svn up whenever possible by requesting '
'actual HEAD revision from the repository')
+ parser.add_option('--upstream', action='store_true',
+ help='Make repo state match upstream branch.')
(options, args) = parser.parse_args(args)
client = GClient.LoadCurrentConfig(options)
@@ -1590,6 +1592,8 @@
'references')
parser.add_option('-n', '--nohooks', action='store_true',
help='don\'t run hooks after the revert is complete')
+ parser.add_option('--upstream', action='store_true',
+ help='Make repo state match upstream branch.')
(options, args) = parser.parse_args(args)
# --force is implied.
options.force = True