From 642382095ddd6f1b270d0e49b50efa90e99958a9 Mon Sep 17 00:00:00 2001 From: Mandeep Singh Baines Date: Thu, 5 Aug 2010 11:01:36 -0700 Subject: [PATCH] cros_mark_as_stable: make it work better in repo Instead of using master, use the tracking branch. BUG=5258 TEST=Verified that cleanup now works with repo. Change-Id: I6e415d9068d54b602238b89c77ba4dbe2f9ff4c6 Review URL: http://codereview.chromium.org/3076035 --- cros_mark_as_stable.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cros_mark_as_stable.py b/cros_mark_as_stable.py index 7c9a230153..d9373c05ef 100755 --- a/cros_mark_as_stable.py +++ b/cros_mark_as_stable.py @@ -91,10 +91,8 @@ def _CheckSaneArguments(package_list, commit_id_list, command): def _Clean(): """Cleans up uncommitted changes on either stabilizing branch or master.""" - if _CheckOnStabilizingBranch(): - _RunCommand('git reset HEAD --hard') - _RunCommand('git checkout master') _RunCommand('git reset HEAD --hard') + _RunCommand('git checkout %s' % gflags.FLAGS.tracking_branch) def _PrintUsageAndDie(error_message=''): @@ -179,7 +177,7 @@ class _GitBranch(object): Returns True on success. """ - self._Checkout('master', create=False) + self._Checkout(gflags.FLAGS.tracking_branch, create=False) delete_cmd = 'git branch -D %s' % self.branch_name _RunCommand(delete_cmd)