Remove references to Skia's SVN repository
authorborenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 9 Jan 2014 21:41:39 +0000 (21:41 +0000)
committerborenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 9 Jan 2014 21:41:39 +0000 (21:41 +0000)
BUG=
R=epoger@google.com

Review URL: https://codereview.chromium.org/132423002

git-svn-id: http://skia.googlecode.com/svn/trunk@13006 2bbb7eff-a529-9590-31e7-b0007b416f81

bench/bench_analyze.py
expectations/gm/view-platform.html
gm/rebaseline_server/static/view.html
platform_tools/android/gclient.config
platform_tools/nacl/gclient.config [deleted file]
tools/build-tot-chromium.sh [deleted file]
tools/buildbot_globals.py
tools/submit_try
tools/update-doxygen.sh

index 74751cbc0f8aa2f17d4fff81034fc0a93ffe8a9b..0e873b556fe697d64b93fe350a5de92b9bf4bb68 100755 (executable)
@@ -55,10 +55,10 @@ INPUT_URL_TEMPLATE = ('http://chromium-skia-gm.commondatastorage.googleapis.com'
 
 # Output HTML elements and templates.
 HTML_HEAD = ('<html><head><title>Skia Bench Expected Ranges</title>'
-             '<script type="text/javascript" src="https://skia.googlecode.com/'
-             'svn/buildbot/dygraph-combined.js"></script></head><body>Please '
-             'adjust values as appropriate and update benches to monitor in '
-             'bench/bench_expectations.txt.<br><br>')
+             '<script type="text/javascript" src="https://raw.github.com/google'
+             '/skia-buildbot/master/dygraph-combined.js"></script></head><body>'
+             'Please adjust values as appropriate and update benches to monitor'
+             ' in bench/bench_expectations.txt.<br><br>')
 HTML_SUFFIX = '</body></html>'
 GRAPH_PREFIX = ('<br>%s<br><div id="%s" style="width:400px;height:200px"></div>'
                 '<script type="text/javascript">g%s=new Dygraph('
index 47575bdaac7f9d9f6933dd13bc58169863fed404..5e370ad6cc60701f909874dc67c814edabb8ba01 100644 (file)
@@ -143,7 +143,7 @@ resolved, we should use similar techniques to populate this list automatically.
 
   <!-- TODO(epoger): Can we get the base URLs (commondatastorage and
        issues list) from
-       http://skia.googlecode.com/svn/buildbot/site_config/global_variables.json ?
+       https://skia.googlesource.com/buildbot/+/master/site_config/global_variables.json ?
        I tried importing the
        http://skia.googlecode.com/svn/buildbot/skia_tools.js script and using
        that to do so, but I got Access-Control-Allow-Origin errors.
index fa5a0c635ba8c1b33083c040f69942321df9559b..cbc2bd8d134e86d0e56b4e1775206cff8d8645ae 100644 (file)
 
   <!-- TODO(epoger): Can we get the base URLs (commondatastorage and
        issues list) from
-       http://skia.googlecode.com/svn/buildbot/site_config/global_variables.json
-       ?  I tried importing the
+       https://skia.googlesource.com/buildbot/+/master/site_config/global_variables.json ?
+       I tried importing the
        http://skia.googlecode.com/svn/buildbot/skia_tools.js script and using
        that to do so, but I got Access-Control-Allow-Origin errors.
     -->
index 43a4fb44f54eec461a6778a20e9e4749b1802cac..a84d81e8b25f023c8115265fac0497636b31f7b2 100644 (file)
@@ -3,8 +3,8 @@
 # and then run "gclient sync".
 solutions = [
   {
-    "name"        : "trunk",
-    "url"         : "https://skia.googlecode.com/svn/trunk",
+    "name"        : "skia",
+    "url"         : "https://skia.googlesource.com/skia.git",
   },
 ]
 target_os = ["android"]
diff --git a/platform_tools/nacl/gclient.config b/platform_tools/nacl/gclient.config
deleted file mode 100644 (file)
index 922ae43..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# To develop Skia targeting NaCl,
-# copy this file to your root development directory as ".gclient"
-# and then run "gclient sync".
-solutions = [
-  {
-    "name"        : "nacl",
-    "url"         : "https://skia.googlecode.com/svn/nacl",
-  },
-  {
-    "name"        : "trunk",
-    "url"         : "https://skia.googlecode.com/svn/trunk",
-  },
-]
diff --git a/tools/build-tot-chromium.sh b/tools/build-tot-chromium.sh
deleted file mode 100755 (executable)
index 4dafa4d..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/bash
-#
-# Author: Ravi Mistry
-#
-# Script to checkout and build a fresh copy of Chromium from head that uses a
-# writable, tip-of-tree Skia rather than the read-only, revision-locked Skia
-# specified in http://src.chromium.org/viewvc/chrome/trunk/src/DEPS
-#
-# Sample Usage:
-#   tools/build-tot-chromium.sh ~/chromiumtrunk
-
-if [[ $# -ne 1 ]] ; then
-  echo "usage: $0 chromium_location"
-  exit 1
-fi
-CHROMIUM_LOCATION=$1
-
-echo -e "\n\n========Deleting $CHROMIUM_LOCATION========\n\n"
-rm -rf $CHROMIUM_LOCATION
-
-mkdir $CHROMIUM_LOCATION
-cd $CHROMIUM_LOCATION
-gclient config https://src.chromium.org/chrome/trunk/src
-echo '
-solutions = [
-  { "name"        : "src",
-    "url"         : "https://src.chromium.org/chrome/trunk/src",
-    "deps_file"   : "DEPS",
-    "managed"     : True,
-    "custom_deps" : {
-      "src/third_party/skia": "https://skia.googlecode.com/svn/trunk",
-      "src/third_party/skia/gyp": None,
-      "src/third_party/skia/src": None,
-      "src/third_party/skia/include": None,
-    },
-    "safesync_url": "http://chromium-status.appspot.com/lkgr",
-  },
-]
-' > .gclient
-
-echo -e "\n\n========Starting gclient sync========\n\n"
-START_TIME=$SECONDS
-gclient sync
-END_TIME=$SECONDS
-echo -e "\n\n========gclient sync took $((END_TIME - START_TIME)) seconds========\n\n"
-
-cd src
-rm -rf out/Debug out/Release
-GYP_GENERATORS='ninja' ./build/gyp_chromium
-
-echo -e "\n\n========Starting ninja build========\n\n"
-START_TIME=$SECONDS
-ninja -C out/Release chrome
-END_TIME=$SECONDS
-echo -e "\n\n========ninja build took $((END_TIME - START_TIME)) seconds========\n\n"
-
-SVN_VERSION=`svnversion .`
-echo -e "\n\n========The Chromium & Skia versions are $SVN_VERSION========\n\n"
-
index c3d222739665ae86a43269b66cf419caadf7f543..8d0e43897b7290d14f129afa964b8e34952f5bdf 100755 (executable)
@@ -8,14 +8,21 @@
 Provides read access to buildbot's global_variables.json .
 """
 
+
+from contextlib import closing
+
+import HTMLParser
 import json
 import svn
+import sys
+import urllib2
+
 
 _global_vars = None
 
 
-GLOBAL_VARS_JSON_URL = (
-    'http://skia.googlecode.com/svn/buildbot/site_config/global_variables.json')
+GLOBAL_VARS_JSON_URL = ('https://skia.googlesource.com/buildbot/+'
+                        '/master/site_config/global_variables.json')
 
 
 class GlobalVarsRetrievalError(Exception):
@@ -38,13 +45,44 @@ class NoSuchGlobalVariable(KeyError):
   pass
 
 
+def retrieve_from_googlesource(url):
+  """Retrieve the given file from GoogleSource's HTTP interface, trimming the
+  extraneous HTML. Intended to be a GoogleSource equivalent of "svn cat".
+
+  This just returns the unescaped contents of the first <pre> tag which matches
+  our expectations for GoogleSource's HTTP interface. If that interface changes,
+  this function will almost surely break.
+
+  Args:
+      url: string; the URL of the file to retrieve.
+  Returns:
+      The contents of the file in GoogleSource, stripped of the extra HTML from
+          the HTML interface.
+  """
+  with closing(urllib2.urlopen(url)) as f:
+    contents = f.read()
+    pre_open = '<pre class="git-blob prettyprint linenums lang-json">'
+    pre_close = '</pre>'
+    start_index = contents.find(pre_open)
+    end_index = contents.find(pre_close)
+    parser = HTMLParser.HTMLParser()
+    return parser.unescape(contents[start_index + len(pre_open):end_index])
+
+
 def Get(var_name):
-  '''Return the value associated with this name in global_variables.json.
-  Raises NoSuchGlobalVariable if there is no variable with that name.'''
+  """Return the value associated with this name in global_variables.json.
+  
+  Args:
+      var_name: string; the variable to look up.
+  Returns:
+      The value of the variable.
+  Raises:
+      NoSuchGlobalVariable if there is no variable with that name.
+  """
   global _global_vars
   if not _global_vars:
     try:
-      global_vars_text = svn.Cat(GLOBAL_VARS_JSON_URL)
+      global_vars_text = retrieve_from_googlesource(GLOBAL_VARS_JSON_URL)
     except Exception:
       raise GlobalVarsRetrievalError('Failed to retrieve %s.' %
                                      GLOBAL_VARS_JSON_URL)
@@ -56,3 +94,7 @@ def Get(var_name):
     return _global_vars[var_name]['value']
   except KeyError:
     raise NoSuchGlobalVariable(var_name)
+
+
+if __name__ == '__main__':
+  print Get(sys.argv[1])
index 81c5dd00ee90253045cd82a6ec89915568c0069c..586fb10dbbb326c506313830fa7b1cadf61d758e 100755 (executable)
@@ -44,10 +44,6 @@ SKIA_BUILD_MASTER_PORT = str(buildbot_globals.Get('public_external_port'))
 # All try builders have this suffix.
 TRYBOT_SUFFIX = '-Trybot'
 
-# Location of the codereview.settings file in the Skia repo.
-SKIA_URL = 'skia.googlecode.com'
-CODEREVIEW_SETTINGS = '/svn/codereview.settings'
-
 # String for matching the svn url of the try server inside codereview.settings.
 TRYSERVER_SVN_URL = 'TRYSERVER_SVN_URL: '
 
@@ -94,16 +90,15 @@ def GetCheckoutRoot(is_svn=True):
 
 
 def GetTryRepo():
-  """ Determine the TRYSERVER_SVN_URL from the codereview.settings file in the
-  Skia repo. """
-  connection = httplib.HTTPConnection(SKIA_URL)
-  connection.request('GET', CODEREVIEW_SETTINGS)
-  content = connection.getresponse().read()
-  for line in content.split('\n'):
-    if line.startswith(TRYSERVER_SVN_URL):
-      return line[len(TRYSERVER_SVN_URL):].rstrip()
+  """Determine the TRYSERVER_SVN_URL from the codereview.settings file."""
+  codereview_settings_file = os.path.join(os.path.dirname(__file__), os.pardir,
+                                          'codereview.settings')
+  with open(codereview_settings_file) as f:
+    for line in f:
+      if line.startswith(TRYSERVER_SVN_URL):
+        return line[len(TRYSERVER_SVN_URL):].rstrip()
   raise Exception('Couldn\'t determine the TRYSERVER_SVN_URL. Make sure it is '
-                  'defined in the %s file.' % CODEREVIEW_SETTINGS)
+                  'defined in the %s file.' % codereview_settings_file)
 
 
 def RetrieveTrybotList(json_filename):
index 348f98fbbf3a19511a9e8c915f15b4f2d15a4c1b..87fee32759ef6860cf82ee4159df62edd1775e27 100755 (executable)
@@ -31,10 +31,13 @@ DOXYGEN_COMMIT=${DOXYGEN_COMMIT:-true}
 mkdir -p $DOXYGEN_TEMPDIR
 cd $DOXYGEN_TEMPDIR
 
-if [ -d "trunk" ]; then
-  svn update --accept theirs-full trunk
+if [ -d "skia" ]; then
+  pushd skia
+  git pull
+  git checkout origin/master
+  popd
 else
-  svn checkout http://skia.googlecode.com/svn/trunk  # read-only
+  git clone https://skia.googlesource.com/skia.git
 fi
 if [ -d "docs" ]; then
   svn update --accept theirs-full docs
@@ -50,11 +53,11 @@ else
 fi
 
 if [ ! -f "docs/static_footer.txt" ]; then
-  cp trunk/tools/doxygen_footer.txt docs/static_footer.txt
+  cp skia/tools/doxygen_footer.txt docs/static_footer.txt
 fi
 
 # Run Doxygen.
-cd trunk
+cd skia
 doxygen Doxyfile
 ret_code=$?
 if [ $ret_code != 0 ]; then