Commit c9cf90ae authored by bauerb@chromium.org's avatar bauerb@chromium.org

Clear configured merge-base when switching upstream.

Otherwise, the old merge-base value can confuse the hell out of `git cl upload`.

BUG=none

Review URL: https://codereview.chromium.org/252683003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@266648 0039d316-1c4b-4281-b951-d872f2087c98
parent 280f2506
......@@ -2320,9 +2320,13 @@ def CMDupstream(parser, args):
cl = Changelist()
if args:
# One arg means set upstream branch.
RunGit(['branch', '--set-upstream', cl.GetBranch(), args[0]])
branch = cl.GetBranch()
RunGit(['branch', '--set-upstream', branch, args[0]])
cl = Changelist()
print "Upstream branch set to " + cl.GetUpstreamBranch()
# Clear configured merge-base, if there is one.
git_common.remove_merge_base(branch)
else:
print cl.GetUpstreamBranch()
return 0
......
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