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

Unified Diff: cros_mark_as_stable.py

Issue 3015061: cros_mark_as_stable: use git push instead of git-cl push (Closed) Base URL: http://src.chromium.org/git/crosutils.git
Patch Set: Created 10 years, 4 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: cros_mark_as_stable.py
diff --git a/cros_mark_as_stable.py b/cros_mark_as_stable.py
index 3af5df8890cb4f70b47012abad869139690ae419..6daf9bb6972ac90acf79c01e1d940400b275d5fb 100755
--- a/cros_mark_as_stable.py
+++ b/cros_mark_as_stable.py
@@ -128,11 +128,22 @@ def _PushChange():
if not _CheckOnStabilizingBranch():
generate_test_report.Die('Expected %s to be on branch "%s"' %
(os.getcwd(), _STABLE_BRANCH_NAME))
- _RunCommand('git cl upload --desc_from_logs -m "%s"' %
- 'Marking set of ebuilds as stable')
+ description = _RunCommand('git log --format=format:%s%n%n%b ' +
+ gflags.FLAGS.tracking_branch + '..')
+ description = 'Marking set of ebuilds as stable\n\n%s' % description
+ merge_branch_name = 'merge_branch'
_RunCommand('git remote update')
- _RunCommand('git rebase %s' % gflags.FLAGS.tracking_branch)
- _RunCommand('git cl push %s' % gflags.FLAGS.push_options)
+ _RunCommand('git checkout -b %s %s' % (
+ merge_branch_name, gflags.FLAGS.tracking_branch))
+ try:
+ _RunCommand('git merge --squash %s' % _STABLE_BRANCH_NAME)
+ _RunCommand('git commit -m "%s"' % description)
+ # Ugh. There has got to be an easier way to push to a tracking branch
+ _RunCommand('git config push.default tracking')
+ _RunCommand('git push')
+ finally:
+ _RunCommand('git checkout %s' % _STABLE_BRANCH_NAME)
+ _RunCommand('git branch -D %s' % merge_branch_name)
def _RunCommand(command):
« 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