bisect-kit: Migrate default branch for float specs
BUG=b:185874058
BUG=b:185978505
TEST=./switch_cros_localbuild_buildbucket.py R92-13916.0.0-47024~R92-13916.0.0-47025/1
TEST=./switch_cros_localbuild_buildbucket.py R92-13910.0.0-46874~R92-13910.0.0-46875/1
TEST=./switch_cros_localbuild_buildbucket.py R92-13958.0.0~R92-13958.0.0-48050/1
Change-Id: Iad01c87340602b7125b518cf61f0746df5073067
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/bisect-kit/+/2888625
Commit-Queue: Zheng-Jie Chang <zjchang@chromium.org>
Tested-by: Zheng-Jie Chang <zjchang@chromium.org>
Auto-Submit: Zheng-Jie Chang <zjchang@chromium.org>
Reviewed-by: Kuang-che Wu <kcwu@chromium.org>
diff --git a/bisect_kit/cros_util.py b/bisect_kit/cros_util.py
index b3c6600..8123d0b 100644
--- a/bisect_kit/cros_util.py
+++ b/bisect_kit/cros_util.py
@@ -2081,19 +2081,19 @@
def _determine_float_branch(self, old, new, fixed_specs):
# There is no revision tag in snapshot's xml. We know snapshot
- # builds are on master branch.
- master_refname = 'refs/remotes/origin/master'
+ # builds are on main branch.
+ main_refname = 'refs/remotes/origin/main'
if fixed_specs[0].revision:
old_branches = git_util.get_branches(
self.manifest_dir, commit=fixed_specs[0].revision, remote=True)
else:
- old_branches = [master_refname]
+ old_branches = [main_refname]
if fixed_specs[-1].revision:
new_branches = git_util.get_branches(
self.manifest_dir, commit=fixed_specs[-1].revision, remote=True)
else:
- new_branches = [master_refname]
+ new_branches = [main_refname]
common_branches = list(set(old_branches) & set(new_branches))
assert common_branches, '%s and %s are not on common branches?' % (old, new)