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
diff --git a/git_cl.py b/git_cl.py
index 1acc12a..e8cadf2 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2320,9 +2320,13 @@
   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