[csw-maintainers] Patch management with Quilt

Ben Walton bwalton at opencsw.org
Mon Jan 9 03:36:27 CET 2012

Excerpts from rupert THURNER's message of Sun Jan 08 15:35:38 -0500 2012:

> mercurial has mq for managing patches, and it is suggested that git
> should not need a dedicated tool any more:
> http://stackoverflow.com/questions/952651/git-equivalent-to-hg-mq

There are two cases to content with here:

1. Updating a patch that still applies.
2. Updating a patch that no longer applies.

For patches that apply still, I think the stack overflow thread
provides sound advice in that git rebase -i is the way to go.  All
patches that get applied are done on a 'csw' branch, so an interactive
rebase against master (or the upstream tag) should be pretty sane.  A
new series of patches for GAR can then be generated with:

git format-patch upstream

Those files should then replace the list of files used in PATCHFILES.

This action could be rolled up in a GAR updatepatches command or
something although I'm not sure of a good way to handle botched
updates short of telling people to do an 'svn revert files/; mgar
spotless; mgar patch' and starting over.

The case where an old patch no longer applies can be handled by either
dropping it or manually recreating it.  In some cases, applying the
patch file with the actual patch command (and a higher fuzz level)
might be useful if the patch is valid but doesn't apply because the
new upstream file has significant changes.  I don't see a good way to
automate this in GAR though.
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

More information about the maintainers mailing list