Add flag to cros_mark_as_stable to specify tracking_branch.

TEST=Ran using default option and then tried -t chromiumorg/master and
saw a correct failure since I don't have that branch to track against.

Review URL: http://codereview.chromium.org/3032019
This commit is contained in:
Chris Sosa 2010-07-23 17:00:34 -07:00
parent b28538692c
commit 80a3b2810a

View File

@ -33,6 +33,9 @@ gflags.DEFINE_string('packages', '',
short_name='p')
gflags.DEFINE_string('push_options', '',
'Options to use with git-cl push using push command.')
gflags.DEFINE_string('tracking_branch', 'origin',
'Used with commit to specify branch to track against.',
short_name='t')
gflags.DEFINE_boolean('verbose', False,
'Prints out verbose information about what is going on.',
short_name='v')
@ -159,7 +162,7 @@ class _GitBranch(object):
def _Checkout(self, target, create=True):
"""Function used internally to create and move between branches."""
if create:
git_cmd = 'git checkout -b %s origin' % target
git_cmd = 'git checkout -b %s %s' % (target, gflags.FLAGS.tracking_branch)
else:
git_cmd = 'git checkout %s' % target
_RunCommand(git_cmd)