Commit 2269427d authored by Josip Sokcevic's avatar Josip Sokcevic Committed by LUCI CQ

Remove branch redirect support in git_cl

Gob already supports branch redirect so we no longer need this in
depot_tools.

R=gavinmak@google.com

Change-Id: I0e697b022dc132bc5cba95e1b1746c0d72fe16aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3137816
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
parent ea46219a
......@@ -4139,16 +4139,6 @@ def GetTargetRef(remote, remote_branch, target_branch):
# Handle the refs that need to land in different refs.
remote_branch = REFS_THAT_ALIAS_TO_OTHER_REFS[remote_branch]
# Migration to new default branch, only if available on remote.
allow_push_on_master = bool(os.environ.get("ALLOW_PUSH_TO_MASTER", None))
if remote_branch == DEFAULT_OLD_BRANCH and not allow_push_on_master:
if RunGit(['show-branch', DEFAULT_NEW_BRANCH], error_ok=True,
stderr=subprocess2.PIPE):
# TODO(crbug.com/ID): Print location to local git migration script.
print("WARNING: Using new branch name %s instead of %s" % (
DEFAULT_NEW_BRANCH, DEFAULT_OLD_BRANCH))
remote_branch = DEFAULT_NEW_BRANCH
# Create the true path to the remote branch.
# Does the following translation:
# * refs/remotes/origin/refs/diff/test -> refs/diff/test
......
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