Gerrit patch uploader

The Gerrit patch uploader allows users with an account on this wiki (MediaWiki.org) to upload patches directly to gerrit without needing a Developer account and without needing to use Git commands.

Go to the uploader: https://gerrit-patch-uploader.toolforge.org/.

Service

Gerrit patch uploader is a Toolforge tool created by Valhallasw.

Example usage

To submit a test patch to the test/test repository, follow these steps:

  1. Go to https://gerrit-patch-uploader.toolforge.org/
  2. Select project test/test
  3. Fill in your author information, for example: My Name <myname@gmail.com>
  4. Fill in a commit message, for example: Testing Gerrit Patch Uploader
  5. Paste a patch in the patch field as generated by one of the listed commands, for example:
    From 932aa75da0cd47ed43739c5b01195565e8e9bd17 Mon Sep 17 00:00:00 2001
    From: My Name <myname@gmail.com>
    Date: Sat, 2 Nov 2024 16:02:32 +0100
    Subject: [PATCH] Testje
    
    ---
     cookies.txt | 1 +
     1 file changed, 1 insertion(+)
     create mode 100644 cookies.txt
    
    diff --git a/cookies.txt b/cookies.txt
    new file mode 100644
    index 0000000..5ab2f8a
    --- /dev/null
    +++ b/cookies.txt
    @@ -0,0 +1 @@
    +Hello
    \ No newline at end of file
    --
    2.47.0.windows.2
    
  6. Press "Submit"

The tool will now upload your patch and will redirect you to the new Gerrit review page.

Amending an uploaded patch

To make a change to the existing patch, first make your modifications to the code and create a new patch. Fill in the patch uploader fields as below but add the Change-Id from the Gerrit page as last line of the commit message.

For example, to add a new patch to https://gerrit.wikimedia.org/r/96693, fill in the patch uploader as usual, but add the following text to the bottom of the commit message field:

Change-Id: I0c31cd68dc372ed38f461e430c135350a1581828

So that it looks something like this:

Ported protect.py from pywikibot compat to core

Made minor changes to protect.py to allow it to run on pywikibot/core

Change-Id: I0c31cd68dc372ed38f461e430c135350a1581828

The Gerrit patch uploader will use the "Change-Id" to find the current change on Gerrit and add a new version to it (instead of creating a new change page).