Don't throw an error if not on stabilizing branch and give more information on exit.

TEST=Ran "cros_mark_as_stable push" with no stabilizing_branch

Review URL: http://codereview.chromium.org/3159010

Change-Id: I31dadc354e224f0f19f0878581204678391ac108
This commit is contained in:
Chris Sosa 2010-08-12 10:33:53 -07:00
parent 82047a9d48
commit bb1d3b0076

View File

@ -126,8 +126,10 @@ def _PushChange():
# Sanity check to make sure we're on a stabilizing branch before pushing.
if not _CheckOnStabilizingBranch():
generate_test_report.Die('Expected %s to be on branch "%s"' %
(os.getcwd(), _STABLE_BRANCH_NAME))
print 'Not on branch %s so no work found to push. Exiting' % \
_STABLE_BRANCH_NAME
return
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