diff options
author | Manoj Gupta <manojgupta@google.com> | 2021-01-21 13:16:43 -0800 |
---|---|---|
committer | Manoj Gupta <manojgupta@chromium.org> | 2021-01-21 21:31:42 +0000 |
commit | 22577141fecb774462ed466fe2ab5aff29524aea (patch) | |
tree | 5c4a6178a7fb06dda916705e8d3760c907c030e3 /llvm_tools | |
parent | a58bd46ce286e2546c432c8fedd23b14a8fc651d (diff) | |
download | toolchain-utils-22577141fecb774462ed466fe2ab5aff29524aea.tar.gz |
llvm_tools: Fix bisection with main branch
1. Use 'origin/main' when checking out llvm repo first time.
2. Use 'cros/main' when checking out chromiumos-overlay.
BUG=None
TEST=local bisection run
Change-Id: Ie4b2d6fcd85c730ddeec9053bb7cfc13235cca34
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2643561
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'llvm_tools')
-rwxr-xr-x | llvm_tools/get_llvm_hash.py | 10 | ||||
-rwxr-xr-x | llvm_tools/git.py | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm_tools/get_llvm_hash.py b/llvm_tools/get_llvm_hash.py index 329e8292..7c770e64 100755 --- a/llvm_tools/get_llvm_hash.py +++ b/llvm_tools/get_llvm_hash.py @@ -88,7 +88,8 @@ def CreateTempLLVMRepo(temp_dir): abs_path_to_llvm_project_dir = GetAndUpdateLLVMProjectInLLVMTools() CheckCommand([ 'git', '-C', abs_path_to_llvm_project_dir, 'worktree', 'add', '--detach', - temp_dir, git_llvm_rev.MAIN_BRANCH + temp_dir, + 'origin/%s' % git_llvm_rev.MAIN_BRANCH ]) try: @@ -124,10 +125,9 @@ def GetAndUpdateLLVMProjectInLLVMTools(): 'llvm-project-copy') if not os.path.isdir(abs_path_to_llvm_project_dir): - print( - 'Checking out LLVM from scratch. This could take a while...\n' - '(This should only need to be done once, though.)', - file=sys.stderr) + print('Checking out LLVM from scratch. This could take a while...\n' + '(This should only need to be done once, though.)', + file=sys.stderr) os.mkdir(abs_path_to_llvm_project_dir) LLVMHash().CloneLLVMRepo(abs_path_to_llvm_project_dir) diff --git a/llvm_tools/git.py b/llvm_tools/git.py index f38d5e72..5d057a75 100755 --- a/llvm_tools/git.py +++ b/llvm_tools/git.py @@ -65,7 +65,7 @@ def DeleteBranch(repo, branch): if not os.path.isdir(repo): raise ValueError('Invalid directory path provided: %s' % repo) - subprocess.check_output(['git', '-C', repo, 'checkout', 'cros/master']) + subprocess.check_output(['git', '-C', repo, 'checkout', 'cros/main']) subprocess.check_output(['git', '-C', repo, 'reset', 'HEAD', '--hard']) |