mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 14:01:43 +01:00
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
This commit is contained in:
parent
92e674967d
commit
642382095d
@ -91,10 +91,8 @@ def _CheckSaneArguments(package_list, commit_id_list, command):
|
|||||||
|
|
||||||
def _Clean():
|
def _Clean():
|
||||||
"""Cleans up uncommitted changes on either stabilizing branch or master."""
|
"""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 reset HEAD --hard')
|
||||||
|
_RunCommand('git checkout %s' % gflags.FLAGS.tracking_branch)
|
||||||
|
|
||||||
|
|
||||||
def _PrintUsageAndDie(error_message=''):
|
def _PrintUsageAndDie(error_message=''):
|
||||||
@ -179,7 +177,7 @@ class _GitBranch(object):
|
|||||||
|
|
||||||
Returns True on success.
|
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
|
delete_cmd = 'git branch -D %s' % self.branch_name
|
||||||
_RunCommand(delete_cmd)
|
_RunCommand(delete_cmd)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user