From aa8cd9bf86bb2505c435dfc8014a9a03b3c95370 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 22 Aug 2013 19:52:25 +0000 Subject: [PATCH] Windows: Always use the depot_tools SVN version instead of the system SVN version. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1401 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- tools/automate/automate.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/automate/automate.py b/tools/automate/automate.py index 48425cfae..75df62b5c 100644 --- a/tools/automate/automate.py +++ b/tools/automate/automate.py @@ -48,12 +48,7 @@ def get_svn_info(path): rev = 'None' if path[0:4] == 'http' or os.path.exists(path): try: - if sys.platform == 'win32': - # Force use of the SVN version bundled with depot_tools. - svn = os.path.join(depot_tools_dir, 'svn.bat') - else: - svn = 'svn' - (stream_in, stream_out, stream_err) = os.popen3(svn+' info --xml '+path) + (stream_in, stream_out, stream_err) = os.popen3(svn_exe+' info --xml '+path) err = stream_err.read() if err == '': tree = ET.ElementTree(ET.fromstring(stream_out.read())) @@ -262,6 +257,12 @@ if not os.path.exists(depot_tools_dir): # checkout depot_tools run('svn checkout '+depot_tools_url+' '+depot_tools_dir, download_dir) +if sys.platform == 'win32': + # Force use of the SVN version bundled with depot_tools. + svn_exe = os.path.join(depot_tools_dir, 'svn.bat') +else: + svn_exe = 'svn' + if not options.url is None: # set the CEF URL cef_url = check_url(options.url) @@ -474,10 +475,10 @@ if not os.path.exists(cef_src_dir) or cef_url_changed: shutil.rmtree(cef_src_dir) # download the CEF source code - run('svn checkout '+cef_url+' -r '+cef_rev+' '+cef_src_dir, download_dir) + run(svn_exe+' checkout '+cef_url+' -r '+cef_rev+' '+cef_src_dir, download_dir) elif cef_rev_changed or options.forceupdate: # update the CEF source code - run('svn update -r '+cef_rev+' '+cef_src_dir, download_dir) + run(svn_exe+' update -r '+cef_rev+' '+cef_src_dir, download_dir) if any_changed or options.forceupdate: # create CEF projects