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

Unified Diff: testing_support/local_rietveld.py

Issue 9212062: Use a newer version of rietveld. It is required to update upload.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: add warning about hg Created 8 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing_support/local_rietveld.py
diff --git a/testing_support/local_rietveld.py b/testing_support/local_rietveld.py
index 2a1c07af0d7582ab1f2d5499312afa463ed47282..5b731839a25218a4c9635dfc2e9cc4f90601ba59 100755
--- a/testing_support/local_rietveld.py
+++ b/testing_support/local_rietveld.py
@@ -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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698