[PATCH 1 of 2] commit: save commit message so it's not destroyed by rollback

Martin Geisler mg at lazybytes.net
Sun Nov 22 17:58:59 CST 2009


Adrian Buehlmann <adrian at cadifra.com> writes:

> On 22.11.2009 22:21, Gilles Moris wrote:
>> On Sunday 22 November 2009 07:11:12 pm Greg Ward wrote:
>>> Rationale: if a pretxncommit hook rejects this commit, the
>>> transaction is rolled back and the user's commit message is
>>> irrevocably lost. So save a copy in .hg/message, just in case. Also
>>> handy if the user deliberately rolls back a commit in order to amend
>>> it.
>> 
>> I would also use the .txt suffix for the message filename as Adrian
>> Buehlmann suggested previously, especially if we want to advertise
>> the file presence in patch #2. This will make Windows users life
>> easier.
>
> Huh?
>
> .hg/message is perfect (without .txt)

Not really, IMHO. Without a filename extension, my Emacs sees this as a
random file and wont know that it should enter text-mode.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20091123/b03b34ef/attachment.pgp>


More information about the Mercurial-devel mailing list