Commit d0adab57 authored by maruel@chromium.org's avatar maruel@chromium.org

Use a newer version of rietveld. It is required to update upload.py

R=cmp@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/9212062

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@119064 0039d316-1c4b-4281-b951-d872f2087c98
parent 01da4f85
#!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# 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.
......@@ -12,11 +12,17 @@ if necessary and starts the server on a free inbound TCP port.
import optparse
import os
import shutil
import socket
import sys
import time
import subprocess2
try:
import subprocess2
except ImportError:
sys.path.append(
os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
import subprocess2
class Failure(Exception):
......@@ -73,20 +79,27 @@ class LocalRietveld(object):
raise Failure(
'Install google_appengine sdk in %s or higher up' % self.base_dir)
if os.path.isdir(os.path.join(self.rietveld, '.svn')):
# Left over from subversion. Delete it.
shutil.rmtree(self.rietveld)
# Second, checkout rietveld if not available.
rev = '9349cab9a3bb'
if not os.path.isdir(self.rietveld):
print('Checking out rietveld...')
try:
subprocess2.check_call(
['svn', 'co', '-q', 'http://rietveld.googlecode.com/svn/trunk@681',
self.rietveld])
[ 'hg', 'clone', '-q', '-u', rev, '-r', rev,
'https://code.google.com/p/rietveld/', self.rietveld])
except (OSError, subprocess2.CalledProcessError), e:
raise Failure('Failed to checkout rietveld\n%s' % e)
raise Failure(
'Failed to checkout rietveld. Do you have mercurial installed?\n'
'%s' % e)
else:
print('Syncing rietveld...')
try:
subprocess2.check_call(
['svn', 'up', '-q', '-r', '681'], cwd=self.rietveld)
['hg', 'co', '-q', '-C', rev], cwd=self.rietveld)
except (OSError, subprocess2.CalledProcessError), e:
raise Failure('Failed to sync rietveld\n%s' % e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment