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

Unified Diff: bin/cbuildbot.py

Issue 5278010: Reconfigure to use ssh connection rather than use different manifest. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Fix 80 char Created 10 years, 1 month 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 | bin/cros_repo_sync_all.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cbuildbot.py
diff --git a/bin/cbuildbot.py b/bin/cbuildbot.py
index 14cfa9948782855ae0905cf60c6ca48a6a5946b0..f6258d12fc978e69a2e7f303ef420ff13e1178d1 100755
--- a/bin/cbuildbot.py
+++ b/bin/cbuildbot.py
@@ -45,27 +45,21 @@ def MakeDir(path, parents=False):
raise
-def RepoSync(buildroot, rw_checkout=False, retries=_DEFAULT_RETRIES):
+def RepoSync(buildroot, retries=_DEFAULT_RETRIES):
"""Uses repo to checkout the source code.
Keyword arguments:
- rw_checkout -- Reconfigure repo after sync'ing to read-write.
retries -- Number of retries to try before failing on the sync.
-
"""
while retries > 0:
try:
# The --trace option ensures that repo shows the output from git. This
# is needed so that the buildbot can kill us if git is not making
# progress.
+ RunCommand(['repo', 'forall', '-c', 'git', 'config',
+ 'url.ssh://git@gitrw.chromium.org:9222.insteadof',
+ 'http://git.chromium.org/git'], cwd=buildroot)
RunCommand(['repo', '--trace', 'sync'], cwd=buildroot)
- if rw_checkout:
- # Always re-run in case of new git repos or repo sync
- # failed in a previous run because of a forced Stop Build.
- RunCommand(['repo', 'forall', '-c', 'git', 'config',
- 'url.ssh://git@gitrw.chromium.org:9222.pushinsteadof',
- 'http://git.chromium.org/git'], cwd=buildroot)
-
retries = 0
except:
retries -= 1
@@ -287,7 +281,7 @@ def _PreFlightRinse(buildroot, board, tracking_branch, overlays):
RunCommand(['sudo', 'killall', 'kvm'], error_ok=True)
-def _FullCheckout(buildroot, tracking_branch, rw_checkout=True,
+def _FullCheckout(buildroot, tracking_branch,
retries=_DEFAULT_RETRIES,
url='http://git.chromium.org/git/manifest'):
"""Performs a full checkout and clobbers any previous checkouts."""
@@ -297,13 +291,12 @@ def _FullCheckout(buildroot, tracking_branch, rw_checkout=True,
RunCommand(['repo', 'init', '-u',
url, '-b',
'%s' % branch[-1]], cwd=buildroot, input='\n\ny\n')
- RepoSync(buildroot, rw_checkout, retries)
+ RepoSync(buildroot, retries)
-def _IncrementalCheckout(buildroot, rw_checkout=True,
- retries=_DEFAULT_RETRIES):
+def _IncrementalCheckout(buildroot, retries=_DEFAULT_RETRIES):
"""Performs a checkout without clobbering previous checkout."""
- RepoSync(buildroot, rw_checkout, retries)
+ RepoSync(buildroot, retries)
def _MakeChroot(buildroot):
« no previous file with comments | « no previous file | bin/cros_repo_sync_all.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698