mw dev mediawiki apply-patches
Releasev0.35.0 · cfeceb67
mw dev mediawiki apply-patches [flags]Fetch Gerrit changes into your development environment.
Given one or more Gerrit change numbers, this command will:
- Query the Gerrit API to determine the project, ref, and fetch URL
- Map the project to the correct local directory (core, extension, or skin)
- Ensure the repository exists locally (or clone it with
--clone-missing) - Stash any uncommitted local changes
- Fetch the change ref
- Apply it using the selected mode
By default, Depends-On: footers from commit messages are resolved and applied first.
Dependency cycles are detected and handled safely (no infinite recursion).
When a Depends-On value is a non-unique Change-Id, resolution uses the start branch
context (default master). Set --start-branch to match your target train/release branch
for deterministic dependency resolution.
If a dependency points to a repository that is not present locally, the command
fails by default. Use --clone-missing to allow automatic cloning.
Modes:
checkout(default): check outFETCH_HEADas a detached HEAD (good for quickly testing exact patchset state)cherry-pick: cherry-pickFETCH_HEADinto your current branch (good for stacking local changes)
This is useful for quickly testing patches from Gerrit in your local dev environment, similar to Patch Demo but running locally.
No Gerrit authentication is required.
Options
Section titled “Options”Global options
Section titled “Global options”Examples
Section titled “Examples”mw dev mediawiki apply-patches --change 1275105mw dev mediawiki apply-patches --change 1275105 --change 1275106mw dev mediawiki apply-patches --change 1275105 --mode checkoutmw dev mediawiki apply-patches --change 1275105 --mode cherry-pickmw dev mediawiki apply-patches --change 1275105 --with-depsmw dev mediawiki apply-patches --change 1275105 --start-branch wmf/1.47.0-wmf.1mw dev mediawiki apply-patches --change 1275105 --with-deps --clone-missingmw dev mediawiki apply-patches --change 1275105 --dry-runSee also
Section titled “See also”Page views: —Sessions: —