From bb1d3b00764daa97e759f415cec4b2fe4e01ea4a Mon Sep 17 00:00:00 2001 From: Chris Sosa Date: Thu, 12 Aug 2010 10:33:53 -0700 Subject: [PATCH] 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 --- cros_mark_as_stable.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cros_mark_as_stable.py b/cros_mark_as_stable.py index 6daf9bb697..eff1bda023 100755 --- a/cros_mark_as_stable.py +++ b/cros_mark_as_stable.py @@ -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