Commit Graph

17 Commits

Author SHA1 Message Date
Chirayu Desai
642284106c aosp-merger: Run git diff with --no-ext-diff
* In case one is using an external diff program
  such as difftastic, this won't work as expected
* thread 'main' panicked at 'Hunk lines should be present in matched lines', /home/$USER/.cargo/registry/src/github.com-1ecc6299db9ec823/difftastic-0.37.0/src/display/hunks.rs:637:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  fatal: external diff died, stopping at core/Makefile

Change-Id: Ie455016fa24b6e00ea021088cc5fc1e4bca3bf94
2023-03-21 04:59:43 +05:30
Michael Bestas
ab49b1e556 aosp-merger: Move aospremote to merge helpers
This ensures aospremote always runs on device/kernel merge

Change-Id: I1cea400a1e22aea3c682765f1c6e09ba9263840d
2023-03-21 04:59:43 +05:30
Michael Bestas
2538c7d1f9 aosp-merger: s/lineageos_branch/os_branch/
Reduce the diff between CalyxOS/LineageOS scripts

Change-Id: I70e409e4bb050c4fd6b826912c7a9640c46ab9df
2023-03-21 04:59:43 +05:30
Michael Bestas
c5e5975dd1 aosp-merger: Allow merge without --old-tag set
Change-Id: I7ef5fde1a9f8b1706f21d2a8c0e1abfcff8bfba0
2023-03-21 04:59:43 +05:30
Michael Bestas
d9c87a53d5 aosp-merger: Abandon staging branch inside _merge_helper
Change-Id: Iea165da1de035cd4228ac28ce351ee3616c4e050
2023-03-21 04:59:43 +05:30
Michael Bestas
3b8c42073d aosp-merger: Always use upstream from .gitupstream when it exists
Change-Id: Ibcaa3b567964865f6cecb7058533ab2331be43d8
2023-03-21 04:59:43 +05:30
Michael Bestas
c44154f25c aosp-merger: Switch all scripts to argument parsing
Change-Id: I7af863d3952e7ae9de16860404bccd2b582caa20
2023-03-21 04:59:43 +05:30
Michael Bestas
1e5a9a85ca aosp-merger: Improve empty merge check
* Handles "Already up to date." merge being registered as "merge"
  instead of "nochange" in merged_repos.txt

Change-Id: I6e73013aa5c30a17f150a444b16365c39cf4280e
2023-03-21 04:59:43 +05:30
Michael Bestas
449925a802 aosp-merger: Force fetch AOSP tags
* There might be conflicting tags due to subtree use in device
  and kernel repositories, preventing the actual merge from happening.

Change-Id: I96d6421b2e8675fc898e28b57e2f948c9db2c27c
2023-03-21 04:59:43 +05:30
Michael Bestas
b92af37df1 aosp-merger: Adapt for LineageOS vars usage
Change-Id: Id63a7377ed68ee7d7743af31747eade2d785369e
2023-03-21 04:59:43 +05:30
Michael Bestas
788196f219 aosp-merger: Fix merged_repos.txt handling after refactor
Change-Id: I8719e4ab8ddd043eefc1e0c1dca9d427b0f0cc7e
2023-03-21 04:59:43 +05:30
Michael Bestas
f5199e1afa aosp-merger: Add script that merges non-forked repositories
* Useful to find differences and potential missing commits
  between AOSP tags with different ancestor on repositories
  that we have not forked.

  One example is this month, switching from Pixel 6
  December 2021 tag to qcom Pixel January 2022 tag.

Change-Id: Ib5bafd50c20375368255ad9bbb8ca702c3361652
2023-03-21 04:59:43 +05:30
Michael Bestas
172a9f5847 aosp-merger: Skip empty merges
* Sometimes we get empty merges caused by AOSP internal
  branch merges. Let's just skip those.

Change-Id: I5a13e8e53af38fe1cb9da4b18a13b88682cb4758
2023-03-21 04:59:42 +05:30
Michael Bestas
b6e3069d94 aosp-merger: Never use git reset --hard ${NEWTAG}
* This makes repositories end up with inconsistent
  git history, requiring force push at some cases.
  Just merge normally, if there are no changes we
  are going to handle it in a cleaner way.

Change-Id: Ida69e91c1881c52dc6d805a07d870d9fe26d6279
2023-03-21 04:59:42 +05:30
Michael Bestas
1284df7391 aosp-merger: Abandon staging branch if there were no changes
Change-Id: Ia1a526bf6df0c457b30739be58962da7ac2bde78
2023-03-21 04:59:42 +05:30
Chirayu Desai
e83beff143 aosp-merger: Improve merge commit message
* Merge and commit separately,
  to get newline between commit content and Change-Id
* Install prepare-commit-msg git hook, for nicer conflict messages
  https://gist.github.com/mikeNG/e55ef8e7a1e5cd596a950386503054fd/

Change-Id: I97370b352ccf4f146b4b6ea89af75e032fb13730
2023-03-21 04:59:42 +05:30
Chirayu Desai
b6a649c37b aosp-merger: Split out the for loop guts to _merge_helper.sh
* This script can be used by other callers to merge individual repos
* Get branch name from our variables
* Don't repo sync -d, it removes any local changes we made to merge
  scripts. Let's just manually sync before running this script.

Change-Id: I7ddfbfd934908e4a72fc2742753b4c704fa6c5e3
2023-03-21 04:59:42 +05:30