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

Unified Diff: tools/update-deps.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 | « tools/tests/factory_configuration/verify_mapping.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/update-deps.py
diff --git a/tools/update-deps.py b/tools/update-deps.py
deleted file mode 100644
index 52d7d368e130d0c218de0dbf6b0dd649a02f33c4..0000000000000000000000000000000000000000
--- a/tools/update-deps.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/python
-# Copyright (c) 2012 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.
-
-"""Run this script to update chromium_revision within the buildbot DEPS file.
-"""
-
-import os
-import re
-import subprocess
-
-
-def GetSvnRevision(file_or_url):
- """Returns the revision of this file within its Subversion repository
- (or the latest revision of a given Subversion repository).
- Raises IOError if unable to find the revision of this file/URL.
- """
- command = ['svn', 'info', file_or_url]
- popen = subprocess.Popen(command, stdout=subprocess.PIPE, shell=False)
- output = popen.stdout.read()
- matches = re.findall('Revision: (\d+)$', output, re.MULTILINE)
- if not matches:
- raise IOError('could not find revision of file_or_url %s' % file_or_url)
- return matches[0]
-
-
-def ReplaceDepsVar(deps_file, variable_name, value):
- """Replaces the definition of a variable within this DEPS file, and writes
- the new version of the file out in place of the old one.
- """
- with open(deps_file, 'r') as file_handle:
- contents_old = file_handle.read()
- contents_new = re.sub(
- '"%s":.*,' % variable_name,
- '"%s": "%s",' % (variable_name, value),
- contents_old)
- with open(deps_file, 'w') as file_handle:
- file_handle.write(contents_new)
-
-
-def Main():
- # cd to the root directory of this checkout.
- os.chdir(os.path.join(os.path.dirname(__file__), os.path.pardir))
-
- # Update chromium_revision in standard DEPS file.
- chromium_rev = GetSvnRevision('http://src.chromium.org/svn/trunk')
- ReplaceDepsVar('DEPS', 'chromium_revision', chromium_rev)
-
-
-if __name__ == '__main__':
- Main()
« no previous file with comments | « tools/tests/factory_configuration/verify_mapping.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698