From 5df6a463133eb8a9f6319e81086044145d3258b7 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Fri, 28 Aug 2009 18:52:26 +0000 Subject: [PATCH] Enforce --force when running gclient runhooks Review URL: http://codereview.chromium.org/173174 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@24761 0039d316-1c4b-4281-b951-d872f2087c98 --- gclient.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gclient.py b/gclient.py index 590a15736..6706344ff 100755 --- a/gclient.py +++ b/gclient.py @@ -39,8 +39,7 @@ Hooks allow custom actions to be performed based on files that have changed in the working copy as a result of a "sync"/"update" or "revert" operation. This could be prevented by using --nohooks (hooks run by default). Hooks can also - be run based on what files have been modified in the working copy - with the "runhooks" operation. If any of these operation are run with + be forced to run with the "runhooks" operation. If "sync" is run with --force, all known hooks will run regardless of the state of the working copy. @@ -67,7 +66,7 @@ Hooks """ __author__ = "darinf@gmail.com (Darin Fisher)" -__version__ = "0.3.2" +__version__ = "0.3.3" import errno import optparse @@ -223,13 +222,11 @@ Valid options: """, "runhooks": """Runs hooks for files that have been modified in the local working copy, -according to 'svn status'. +according to 'svn status'. Implies --force. usage: runhooks [options] Valid options: - --force : runs all known hooks, regardless of the working - copy status --verbose : output additional diagnostics """, "revinfo": @@ -1699,6 +1696,7 @@ def DoRunHooks(options, args): # Print out the .gclient file. This is longer than if we just printed the # client dict, but more legible, and it might contain helpful comments. print(client.ConfigContent()) + options.force = True return client.RunOnDeps('runhooks', args)