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

Unified Diff: slave/skia_slave_scripts/utils/force_update_checkout.py

Issue 648353002: Remove Skia's forked buildbot code (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Address comment Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « slave/skia_slave_scripts/utils/file_utils_test.py ('k') | slave/skia_slave_scripts/utils/gclient_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: slave/skia_slave_scripts/utils/force_update_checkout.py
diff --git a/slave/skia_slave_scripts/utils/force_update_checkout.py b/slave/skia_slave_scripts/utils/force_update_checkout.py
deleted file mode 100644
index a68f34aa581f7fe4f63277ded557055d61bafbf6..0000000000000000000000000000000000000000
--- a/slave/skia_slave_scripts/utils/force_update_checkout.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-"""Forcibly update the local checkout."""
-
-
-
-import os
-import shlex
-import sys
-
-BUILDBOT_PATH = os.path.realpath(os.path.join(
- os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir, os.pardir)
-)
-
-sys.path.append(os.path.join(BUILDBOT_PATH, 'common'))
-sys.path.append(os.path.join(BUILDBOT_PATH, 'site_config'))
-sys.path.append(os.path.join(BUILDBOT_PATH, 'third_party',
- 'chromium_buildbot', 'scripts'))
-
-import gclient_utils
-from py.utils import git_utils
-from py.utils import misc
-from py.utils import shell_utils
-import skia_vars
-
-
-BUILDBOT_GIT_URL = skia_vars.GetGlobalVariable('buildbot_git_url')
-GOT_REVISION_PATTERN = 'Skiabot scripts updated to %s'
-
-
-def force_update():
- with misc.ChDir(os.path.join(misc.BUILDBOT_PATH, os.pardir)):
- # Run "gclient" before doing anything else to ensure that we get the
- # necessary stuff installed.
- gclient_utils.GClient()
-
- # Be sure that we sync to the most recent commit.
- buildbot_revision = None
- try:
- output = git_utils.GetRemoteMasterHash(BUILDBOT_GIT_URL)
- if output:
- buildbot_revision = shlex.split(output)[0]
- except shell_utils.CommandFailedException:
- pass
- if not buildbot_revision:
- buildbot_revision = 'origin/master'
-
- gclient_utils.Sync(revisions=[('buildbot', buildbot_revision)],
- verbose=True, force=True)
- got_revision = gclient_utils.GetCheckedOutHash()
- print GOT_REVISION_PATTERN % got_revision
-
- return gclient_utils.GetCheckedOutHash()
-
-
-if __name__ == '__main__':
- force_update()
« no previous file with comments | « slave/skia_slave_scripts/utils/file_utils_test.py ('k') | slave/skia_slave_scripts/utils/gclient_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698