1# Overview 2 3See go/llvm-patch-sync for motivation, diagrams, and design docs. The 4`patch_sync` tool also has a detailed `--help`, which can be quickly 5accessed via `cargo run -- --help`, `cargo run -- transpose --help`, 6and `cargo run -- show --help`. 7 8## Building 9 10```rs 11# Release version 12cargo build --release 13 14# Debug version 15cargo build 16``` 17 18The executable will then exist at `./target/(debug|release)/patch_sync`. 19 20## Running Unittests 21 22```rs 23cargo test 24``` 25 26Because `patch_sync` requires a specific file system layout to work correctly, 27the unittests are unfortunately fairly sparse. Full testing will likely require 28running `patch_sync transpose ...` with the necessary arguments. 29 30## Example Transpose Command 31 32This command will: 33 341. Sync the Android toolchain and ChromiumOS overlay repositories. 352. Find any new patches between the current version and the base ref. 363. Copy any new and applicable patches into each repository. 37 38``` 39./patch_sync transpose \ 40 --sync \ 41 --aosp-checkout "${HOME}/android" \ 42 --aosp-base-ref "${base_aosp_git_hash}" \ 43 --cros-checkout "${HOME}/chromiumos" \ 44 --overlay-base-ref "${base_cros_git_hash}" 45``` 46