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

Unified Diff: tools/submit_try

Issue 12726006: Use "svn cat" in tools/submit_try (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | « no previous file | tools/svn.py » ('j') | tools/svn.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/submit_try
===================================================================
--- tools/submit_try (revision 8147)
+++ tools/submit_try (working copy)
@@ -13,27 +13,19 @@
"""
-from contextlib import closing
-
import httplib
import json
import os
import subprocess
+import svn
import sys
-import urllib2
-def GetGlobalVariables():
- """ Retrieve a global variable from the global_variables.json file. """
- global_variables_file = ('http://skia.googlecode.com/svn/buildbot/'
- 'site_config/global_variables.json')
- with closing(urllib2.urlopen(global_variables_file)) as f:
- return json.load(f)
+GLOBAL_VARIABLES = json.loads(svn.Svn.Cat('http://skia.googlecode.com/svn/'
+ 'buildbot/site_config/'
+ 'global_variables.json'))
-GLOBAL_VARIABLES = GetGlobalVariables()
-
-
def GetGlobalVariable(var_name):
return GLOBAL_VARIABLES[var_name]['value']
@@ -79,8 +71,7 @@
a git checkout.
"""
if is_svn:
- svn_cmd = 'svn.bat' if os.name == 'nt' else 'svn'
- cmd = [svn_cmd, 'info']
+ cmd = [svn.SVN, 'info']
epoger 2013/03/14 17:48:32 Given that the "info" command, unlike "svn cat", i
borenet 2013/03/14 18:25:18 Done.
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
if proc.wait() != 0:
« no previous file with comments | « no previous file | tools/svn.py » ('j') | tools/svn.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698