Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We are currently in the process of moving our contribution workflow to Github pull requests, so the patch review tool is slowly getting phased out. If you are still interested in using it, or learning more about it, you can find the instructions here.

Contributor and Reviewer Workflow

The process for contributing or reviewing a patch is documented in the Contributing Code Changes page.

Reviewer workflow:

This assumes you already have a copy of the repository.

1. Make sure your code is up-to-date:

Code Block
  git fetch

2. Checkout the destination branch:

Code Block
  git checkout trunk

3. See what the patch will do:

Code Block
  git apply --stat xyz-v1.patch

4. See that the patch will apply cleanly (otherwise prod the contributor to rebase):

Code Block
  git apply --check xyz-v1.patch

6. Apply the patch to trunk

Code Block
  git am --signoff < xyz-v1.patch

If you get an error that says "Patch does not have a valid e-mail address." then the patch might have been created by doing git diff in which case you can apply the patch using

Code Block
patch -p1 < xyz-v1.patch

if the am operation failed you will also need to remove the .git/rebase-apply/ that gets created

7. If things go wrong (tests fail, you find some problem, etc), you can back out:

Code Block
  git reset --hard HEAD
  git clean -f

8. Push the change back to Apache:

Code Block
  git push origin trunk

...

Commiter Workflow

If you have commit access on the apache repository then you will not be applying patches in the manner described in the reviewer workflow. Instead, once your patch has been reviewed you will check it in yourself as follows:

...