diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-19 18:54:10 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-19 18:54:10 +0000 |
commit | 6b8c2fb4723a7d9da5703f3d13526f136874e21f (patch) | |
tree | 066ae7ce51b298b1e9e0b89bc21dcf3ee5282bf9 /tools/sync-webkit-git.py | |
parent | dc656ee6077f2074d7a29152aea22105aaa37f95 (diff) | |
download | chromium_src-6b8c2fb4723a7d9da5703f3d13526f136874e21f.zip chromium_src-6b8c2fb4723a7d9da5703f3d13526f136874e21f.tar.gz chromium_src-6b8c2fb4723a7d9da5703f3d13526f136874e21f.tar.bz2 |
sync-webkit-git: exit with an error code on failure
Useful when running it in combination with other programs.
Review URL: http://codereview.chromium.org/3015007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52923 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/sync-webkit-git.py')
-rwxr-xr-x | tools/sync-webkit-git.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/sync-webkit-git.py b/tools/sync-webkit-git.py index 4b99357..239e6ad 100755 --- a/tools/sync-webkit-git.py +++ b/tools/sync-webkit-git.py @@ -105,7 +105,7 @@ def UpdateCurrentCheckoutIfAppropriate(): print "has some other branch ('%s') checked out." % branch print "Run 'git checkout gclient' under third_party/WebKit if you want" print "to switch it to the version requested by DEPS." - return + return 1 if subprocess.call(['git', 'diff-index', '--exit-code', '--shortstat', 'HEAD']): @@ -122,16 +122,17 @@ def main(): print "See http://code.google.com/p/chromium/wiki/UsingWebKitGit for" print "setup instructions." - return + return 1 webkit_rev = GetWebKitRev() print 'Desired revision: r%s.' % webkit_rev os.chdir('third_party/WebKit') changed = UpdateGClientBranch(webkit_rev) if changed: - UpdateCurrentCheckoutIfAppropriate() + return UpdateCurrentCheckoutIfAppropriate() else: print "Already on correct revision." + return 0 if __name__ == '__main__': - main() + sys.exit(main()) |