Commit 7a3dd357 authored by stip's avatar stip Committed by Commit bot

Change usage of deprecated flag.

BUG=Every time I run 'git cl upstream' I get "The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to."

Review-Url: https://codereview.chromium.org/2352393003
parent 32d8737b
...@@ -1375,8 +1375,8 @@ class Changelist(object): ...@@ -1375,8 +1375,8 @@ class Changelist(object):
('\nFailed to diff against upstream branch %s\n\n' ('\nFailed to diff against upstream branch %s\n\n'
'This branch probably doesn\'t exist anymore. To reset the\n' 'This branch probably doesn\'t exist anymore. To reset the\n'
'tracking branch, please run\n' 'tracking branch, please run\n'
' git branch --set-upstream %s trunk\n' ' git branch --set-upstream-to origin/master %s\n'
'replacing trunk with origin/master or the relevant branch') % 'or replace origin/master with the relevant branch') %
(upstream_branch, self.GetBranch())) (upstream_branch, self.GetBranch()))
issue = self.GetIssue() issue = self.GetIssue()
...@@ -4869,7 +4869,7 @@ def CMDupstream(parser, args): ...@@ -4869,7 +4869,7 @@ def CMDupstream(parser, args):
if args: if args:
# One arg means set upstream branch. # One arg means set upstream branch.
branch = cl.GetBranch() branch = cl.GetBranch()
RunGit(['branch', '--set-upstream', branch, args[0]]) RunGit(['branch', '--set-upstream-to', args[0], branch])
cl = Changelist() cl = Changelist()
print('Upstream branch set to %s' % (cl.GetUpstreamBranch(),)) print('Upstream branch set to %s' % (cl.GetUpstreamBranch(),))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment