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: |