Skip to content

Add script to create mozjs patches#719

Open
jschwe wants to merge 1 commit intoservo:mainfrom
jschwe:create_patch_script
Open

Add script to create mozjs patches#719
jschwe wants to merge 1 commit intoservo:mainfrom
jschwe:create_patch_script

Conversation

@jschwe
Copy link
Member

@jschwe jschwe commented Mar 16, 2026

This adds a simple script to create patches for etc/patches based on an existing commit.
I previously always forgot the commands to create a patch and used to hand-edit patches so that they apply to the correct subdirectory. That's obviously a waste of time, hence here a small script which creates a patch file from an existing commit, and verifies that the patch applies.
It supports optionally printing the patch to stdout (so you can pipe it into other tools if necessary), writing to a specific file (so you can overwrite a previous patch, e.g. if you edited your local commit) and by default creates a new patch file with the correct number (until we hit 9999 patches, then a script update will be necessary).

Testing: Basic manual testing by running the script locally.
Servo PR: Not required, mozjs internal change.

This adds a simple script to create patches for etc/patches based on
an existing commit.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant