Previous: Log Message Handling, Up: Project Check In


4.5.3 Commit Operation

The commit operation occurs after typing C-c C-p c from the mail buffer if you have not required log message editing, or after typing C-c C-p c or C-c C-c from the log message buffer otherwise.

At that point, Patcher has constructed a proper commit command. What happens next depends on the value of the :edit-commit-command project option: if nil, Patcher performs the commit operation directly. Otherwise (the default), you have the ability to edit or at least confirm the commit command.

Commit command editing happens in a special buffer called *<project name> Patcher Project Commit Command*.

This buffer is governed by a major mode called patcher-cmtcmd-mode. This mode offers a hook, patcher-cmtcmd-mode-hook, which you can use to plug additional behavior like turning on font lock. If you do so, you might also want to have a look at patcher-cmtcmd-font-lock-keywords, patcher-comment-face and patcher-reference-face which are the built-in elements for commit command fontification.

This buffer starts with an informative comment header. The actual commit command consists in all non blank and non comment lines concatenated together.

Once you're happy with your commit command, you finally perform the operation by calling the function patcher-cmtcmd-commit, bound to both C-c C-p c as in mail buffers, and to C-c C-c.

The commit command buffer offers two more commands in case you change your mind about the commit:

patcher-cmtcmd-cancel
Bound to C-c C-z. Just as in log message buffers, use this when you decide to cancel the commit operation (but not the whole project). Patcher will simply bring you back to where you came from; typically the mail buffer or the log message buffer.
patcher-cmtcmd-kill
Bound to C-c C-k. Just as in log message buffers, use this to completely kill the project. Remember that you can also do that from mail or ChangeLog buffers as well.

After the commit operation, Patcher changes some parts of the mail buffer in the following manner: