Skip to content

Commit cd6f1a3

Browse files
bjarki-andreasencarlescufi
authored andcommitted
scripts: west_commands: introduce ncs-cherry-pick
The west ncs-cherry-pick automates most of the manual, tedious work required to cherry pick commits from an OSS upstream, be that fromlisting commits from a PR, or selecting one or more fromtrees. The command allows specifying which commits to cherry-pick, the command will then automatically cherry-pick and revert any commits required to cleanly cherry pick the commits from upstream. Any conflicting commits from downstream will be listed for manual reapplication. Once a cherry-pick is ready, the command can also rebase/resync an existing branch, so rebase on downstream main, remove now empty fromtrees, and update the fromlisted commits from the PR, even converting them to fromtrees if the PR got merged. The script can cherry pick from and two specified branches as well, for example picking from upstream main to downstream v3.2-branch for manual backports. Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
1 parent ecd8c13 commit cd6f1a3

4 files changed

Lines changed: 1454 additions & 0 deletions

File tree

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,10 @@
736736
/scripts/west_commands/create_board/ @gmarull
737737
/scripts/west_commands/sbom/ @nrfconnect/ncs-co-scripts
738738
/scripts/west_commands/thingy91x_dfu.py @nrfconnect/ncs-cia
739+
/scripts/west_commands/ncs_cherry_pick.py @nrfconnect/ncs-vestavind
739740
/scripts/west_commands/ncs_ironside_se_update.py @nrfconnect/ncs-aurora
740741
/scripts/west_commands/ncs_provision.py @nrfconnect/ncs-eris
742+
/scripts/west_commands/tests/test_ncs_cherry_pick.py @nrfconnect/ncs-vestavind
741743
/scripts/bootloader/ @nrfconnect/ncs-eris
742744
/scripts/reglock.py @nrfconnect/ncs-eris
743745
/scripts/ncs-docker-version.txt @nrfconnect/ncs-ci

scripts/west-commands.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ west-commands:
4444
- name: ncs-ironside-se-update
4545
class: NcsIronSideSEUpdate
4646
help: IronSide SE update utility
47+
- file: scripts/west_commands/ncs_cherry_pick.py
48+
commands:
49+
- name: ncs-cherry-pick
50+
class: NcsCherryPick
51+
help: NCS cherry-pick utility

0 commit comments

Comments
 (0)