Jim Radford and I wrote a neat little utility that lets you check in select portions of a file into Darcs, Git, Mercurial, Bazaar, Subversion, or CVS repositories. It comes as a command line app and also and emacs interface.
See my blog entry about commit-patch for some detailed information on why you might want to use commit-patch.
Debian "Wheezy" (7.0), "Testing", and "Unstable" now provide commit-patch. Simply "apt-get install commit-patch" if you have a Debian system.
Read the ChangeLog.
The development repository can found at github. You can get it like this:
git clone git://github.com/caldwell/commit-patch.git
commit-patch relies on several programs to get the job done:
commit-patch is known to run on Linux and Mac OS X. It is written in perl, so ideally it will run anywhere, but we have never tested in other environments, most notably Windows. Use at your own risk.
See the man page.
commit-patch-buffer.el is an emacs interface to
commit-patch. It allows you to just hit
C-c in any patch buffer to apply and commit only the changes
indicated by the patch, regardless of the changes in your working
To use commit-patch-buffer with diff mode automatically, add this to your emacs init file:
(eval-after-load 'diff-mode '(require 'commit-patch-buffer nil 'noerror))
The easy way of working with commit-patch-buffer is to
vc-diff a file (or
M-x vc-root-diff your whole
project) then kill, split or edit the resulting hunks using diff
mode's built-in commands and to then hit
C-c C-c to
commit the patch.
The older bash version that only supports CVS can be found here: http://blackbean.org/cvs-commit-patch/
commit-patch is distributed under the GNU General Public License. See the COPYING file for more details.