Patch Trac based projects
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Build Status

Patch your develop-wordpress directory like a boss (also works on other trac based projects)

Getting Started

This plugin requires Grunt ~0.4.1

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

  npm install grunt-patch-wordpress --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:


The "patch_wordpress" task

  tracUrl: ''

Apply a patch from the command line

  1. Have a diff or a patch file in your working Directory, then run grunt patch. If multiple files are found, you'll be asked which one to apply.

  2. Enter a ticket number, e.g.

  • grunt patch:15705
  1. Enter a ticket url, e.g.
  • grunt patch:
  1. Enter a patch url, e.g.
  • grunt patch:
  1. Enter a github url that points to a changeset such as a Pull Request, e.g.
  • grunt patch:

Upload a patch from the command line

After you've made changes to your local WordPress develop repository, you can upload a patch file directly to a Trac ticket. e.g. given the ticket number is 2907,

grunt upload_patch:2907


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • 0.1.0 - Initial Release
  • 0.1.1 - Fix bug when only one diff|patch exists in the working directory
  • 0.1.2 - Update wording of instructions
  • 0.2.0 - Add support for patches generated in more ways. Improve UX by outputing results all the time
  • 0.3.0 - Only keep diff when debug flag is passed. Default to selecting newest patch. Make more files patchable. Allow input during patching process incase the shell prompts the user
  • 0.4.0 - add upload_patch, add support for github urls
  • 0.4.1 - Remove Mocha as a peerdendency
  • 0.4.2 - set cmd-diff to diff for svn