Rollback ate my commit message! (issue 1635)

Matt Mackall mpm at selenic.com
Tue Nov 17 20:38:38 CST 2009


On Tue, 2009-11-17 at 21:11 -0500, Greg Ward wrote:
> Hi all --
> 
> several months ago, I filed issue 1635 because the behaviour of "hg
> rollback" occasionally annoyed me a bit.  Now I have discovered a
> really killer use case for fixing issue 1635: pretxncommit hooks.
> 
> Imagine this: you prepare a beautiful patch and run "hg commit".  Type
> in a carefully handcrafted commit message that describes exactly what
> you did in clear, concise language.  (You know how hard that can be!)
> Then some jerk's pretxncommit hook barges in and tells you that your
> commit message is malformatted, or your code doesn't meet the style
> guideline, or you created a filename with spaces in it ... whatever
> your local hook is designed to enforce.
> 
> So Mercurial rolls back the transaction.  Your beautiful patch is
> still there in the working dir, of course.  But that carefully crafted
> commit message?  Gone.  Poof!

Why not save off the message in either:

a) your commit edit helper
b) a pretxncommit hook of your own


-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list