Previous: ChangeLogs Prologue, Up: ChangeLogs Handling


4.4.6 ChangeLogs Status

Let's face it. ChangeLogs are in fact an obsolete concept that dates back to the old days when we used to work without revision control systems. Now the story is different: we have commit log messages, git blame and what not, to the point that ChangeLog files are big and not really useful anymore.

On the other hand, the ChangeLog file format is still convenient to describe modifications, for instance in the commit log message. So how nice would it be to continue manipulating ChangeLog entries, as usual, but just not store them into files?

Patcher can do that. It has a project option named :change-logs-status which can have two values (symbols). A value of persistent (the default) is in fact what we have assumed so far: there are ChangeLog files and they are part of the project. This is the traditional approach.

A value of ephemeral on the other hand means that your ChangeLog entries exist only temporarily, to be used in the commit log message and/or inserted verbatim in the mail. Patcher does this by creating a temporary ChangeLog file (named after the :change-log-file-name project option) in the project's base directory, and getting rid of it after the mail is sent. As a result, everything works just as if the ChangeLog file was real: ChangeLog entries can be generated automatically or written manually etc.

The only restriction is that you cannot diff the ephemeral ChangeLog entries because they are not really part of the project, so their appearance can only be verbatim. Also, when you use an ephemeral ChangeLog, beware to use a file name that doesn't conflict with existing files (old ChangeLog files may for example be renamed to ChangeLog.dead).

Because there's only one, virtual, ephemeral ChangeLog file located at the project's base directory, the default value for the ChangeLogs prologue doesn't work very well in the ephemeral case. It doesn't make sense to refer to the file itself, since it's only temporary. A simpler prologue like “ChangeLog entries:” would suffice. Patcher provides a built-in theme called ‘ephemeral-change-logs’ that you can use to both set the ChangeLog status to ‘ephemeral’ and modify the prologue at the same time.

One final note: if you use the git-index built-in theme with ephemeral ChangeLogs, don't use it in conjunction with git-index-automatic-change-logs, even if the ChangeLogs entries are generated automatically by Patcher. Otherwise, they would be added to the staging area, which is definitely not what you want.