From 2269427d319f9151a8b82b525a8c8f8d9c8e6912 Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Wed, 1 Sep 2021 19:59:33 +0000 Subject: [PATCH] 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 Reviewed-by: Gavin Mak Commit-Queue: Josip Sokcevic --- git_cl.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/git_cl.py b/git_cl.py index e801449f24..6df4762677 100755 --- a/git_cl.py +++ b/git_cl.py @@ -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