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

Adrian Buehlmann adrian at cadifra.com
Sun Nov 22 18:38:29 CST 2009


On 23.11.2009 00:58, Martin Geisler wrote:
> 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.
> 

IMHO, users are not supposed to look into the .hg dir without a tool
that knows about .hg dirs.

That's why it is a hidden dir :)

No other editable text files inside .hg (and further down) have a .txt
suffix currently (e.g. .hg/patches/series).

So tools deciding on suffix about content are a rather weak argument.

It's probably best if Matt just picks a name and ends this discussion.

-- 
Adrian Buehlmann

http://mercurial.wikispaces.com/ - a smaller wiki about using Mercurial



More information about the Mercurial-devel mailing list