Rollback ate my commit message! (issue 1635)
Matt Mackall
mpm at selenic.com
Wed Nov 18 13:20:07 CST 2009
On Wed, 2009-11-18 at 13:30 -0500, Greg Ward wrote:
> On Tue, Nov 17, 2009 at 9:38 PM, Matt Mackall <mpm at selenic.com> wrote:
> >> 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
>
> Sure, there are lots of ways I could fix this that benefit only me and
> my colleagues. But this annoyance can affect anyone using Mercurial.
> ("Oops! typo in that commit message! I'll just rollback and fix it ...
> oh. wait. rollback ate my commit message. @^%!^@^@#") And it's even
> more likely to bite anyone using a pretxncommit hook with teeth.
>
> So I am proposing to fix it in a way that benefits all Mercurial users
> all of the time. Cost: 3 lines of code and a little extra I/O for
> each commit. If you really don't think it's worth it, then I'll just
> do it early in our pretxncommit hook. It will stop annoying me, and
> will continue to annoy the invisible people who don't complain.
> (Possibly an empty set, but I doubt it.)
>
> As for "a) your commit edit helper", do you mean a mythical shell
> script run by hg that in turn runs my $EDITOR? But I don't have one,
> and don't want to need one. I've never needed one with CVS or
> Subversion, so why should I need one for Mercurial? Oh yeah...
> because rollback ate my commit message, and that doesn't happen with
> CVS or Subversion -- even when a server-side commit hook rejects my
> commit.
Huh, I've used such a script since literally day one; I'm surprised to
hear that any power user isn't. Mine launches my editor with two panes,
one containing a diff which I find quite handy in detailing my changes.
It also pulls up my accumulated notes, and with another line of shell
could create a backup.
But I'm not really opposed to your idea.
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel
mailing list