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

Unified Diff: bin/cbuildbot.py

Issue 4104005: Correctly initialize tracking branch in preflight rinse. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Created 10 years, 2 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: bin/cbuildbot.py
diff --git a/bin/cbuildbot.py b/bin/cbuildbot.py
index d58a72727b678f586982f2370890542210f6b950..6708c045b45069a623e9565700c999d48dd0f0e3 100755
--- a/bin/cbuildbot.py
+++ b/bin/cbuildbot.py
@@ -224,13 +224,13 @@ def _GetVMConstants(buildroot):
return (vdisk_size.strip(), statefulfs_size.strip())
-def _GitCleanup(buildroot, board):
+def _GitCleanup(buildroot, board, tracking_branch):
"""Clean up git branch after previous uprev attempt."""
cwd = os.path.join(buildroot, 'src', 'scripts')
if os.path.exists(cwd):
RunCommand(['./cros_mark_as_stable', '--srcroot=..',
'--board=%s' % board,
- '--tracking_branch="cros/master"', 'clean'],
+ '--tracking_branch="%s"' % tracking_branch, 'clean'],
cwd=cwd, error_ok=True)
@@ -253,9 +253,9 @@ def _WipeOldOutput(buildroot):
# =========================== Main Commands ===================================
-def _PreFlightRinse(buildroot, board):
+def _PreFlightRinse(buildroot, board, tracking_branch):
"""Cleans up any leftover state from previous runs."""
- _GitCleanup(buildroot, board)
+ _GitCleanup(buildroot, board, tracking_branch)
_CleanUpMountPoints(buildroot)
RunCommand(['sudo', 'killall', 'kvm'], error_ok=True)
@@ -490,7 +490,7 @@ def main():
sys.exit(1)
try:
- _PreFlightRinse(buildroot, buildconfig['board'])
+ _PreFlightRinse(buildroot, buildconfig['board'], tracking_branch)
if options.clobber or not os.path.isdir(buildroot):
_FullCheckout(buildroot, tracking_branch, url=options.url)
else:
« 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