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

Unified Diff: cros_mark_as_stable.py

Issue 3141045: cros_mark_as_stable: delete merge_branch if it already exists (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Fixed. 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 4cf93cbe47b0d598ea4f8722f4c63e6597cac6db..83f878260feb03617aa4ac134620d813d2cc3cfa 100755
--- a/cros_mark_as_stable.py
+++ b/cros_mark_as_stable.py
@@ -110,6 +110,9 @@ def _PrintUsageAndDie(error_message=''):
else:
sys.exit(1)
+def _BranchExists(name):
petkov 2010/08/26 03:39:35 Unused? Remove.
+ """Returns True is the branch exists"""
+ return _RunCommand('git branch').split().count(name) != 0
def _PushChange():
"""Pushes changes to the git repository.
@@ -135,6 +138,10 @@ def _PushChange():
description = 'Marking set of ebuilds as stable\n\n%s' % description
merge_branch_name = 'merge_branch'
_RunCommand('git remote update')
+ merge_branch = _GitBranch(merge_branch_name)
+ merge_branch.CreateBranch()
+ if not merge_branch.Exists():
+ generate_test_report.Die('Unable to create merge branch.')
_RunCommand('git checkout -b %s %s' % (
petkov 2010/08/26 03:39:35 This seems redundant with CreateBranch above. Does
petkov 2010/08/26 16:47:18 Btw, this does emit a "fatal" message: ... HEAD i
merge_branch_name, gflags.FLAGS.tracking_branch))
_RunCommand('git merge --squash %s' % _STABLE_BRANCH_NAME)
« 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