diff options
Diffstat (limited to 'llvm_tools/patch_sync/src/version_control.rs')
-rw-r--r-- | llvm_tools/patch_sync/src/version_control.rs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm_tools/patch_sync/src/version_control.rs b/llvm_tools/patch_sync/src/version_control.rs index e07d39d6..fc6211ae 100644 --- a/llvm_tools/patch_sync/src/version_control.rs +++ b/llvm_tools/patch_sync/src/version_control.rs @@ -1,3 +1,7 @@ +// Copyright 2022 The ChromiumOS Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + use anyhow::{anyhow, bail, ensure, Context, Result}; use regex::Regex; use std::ffi::OsStr; @@ -8,11 +12,12 @@ use std::process::{Command, Output}; const CHROMIUMOS_OVERLAY_REL_PATH: &str = "src/third_party/chromiumos-overlay"; const ANDROID_LLVM_REL_PATH: &str = "toolchain/llvm_android"; -const CROS_MAIN_BRANCH: &str = "main"; -const ANDROID_MAIN_BRANCH: &str = "master"; // nocheck +// Need to checkout the upstream, rather than the local clone. +const CROS_MAIN_BRANCH: &str = "cros/main"; +const ANDROID_MAIN_BRANCH: &str = "aosp/master"; // nocheck const WORK_BRANCH_NAME: &str = "__patch_sync_tmp"; -/// Context struct to keep track of both Chromium OS and Android checkouts. +/// Context struct to keep track of both ChromiumOS and Android checkouts. #[derive(Debug)] pub struct RepoSetupContext { pub cros_checkout: PathBuf, @@ -135,14 +140,14 @@ impl RepoSetupContext { .join("patches/PATCHES.json") } - /// Get the Chromium OS path to the PATCHES.json file + /// Get the ChromiumOS path to the PATCHES.json file pub fn cros_patches_path(&self) -> PathBuf { self.cros_checkout .join(&CHROMIUMOS_OVERLAY_REL_PATH) .join("sys-devel/llvm/files/PATCHES.json") } - /// Return the contents of the old PATCHES.json from Chromium OS + /// Return the contents of the old PATCHES.json from ChromiumOS pub fn old_cros_patch_contents(&self, hash: &str) -> Result<String> { Self::old_file_contents( hash, |