[RFC] Amend commit messages

Didly didlybom at gmail.com
Wed Feb 23 07:31:58 CST 2011


On Wed, Feb 23, 2011 at 1:13 PM, Gilles Moris <gilles.moris at free.fr> wrote:

> On Wednesday 23 February 2011 12:51:53 pm Laurens Holst wrote:
> > I don’t think it’s necessary, or desirable.
> >
> > It doesn’t happen that often, and when it does, usually you still have
> > the opportunity to do hg rollback or even to edit it with MQ or histedit
> > as you said.
> >
> > If you’ve pushed out the changes already, then zut, so be it. Honestly,
> > it’s really not a big deal to have a less-than-perfect commit message.
> > Can’t change commit messages at all with SVN once you’ve committed, I
> > think with the existing possibilities Mercurial is already a lot more
> > powerful than that.
>
> OK. I already answered Jason in this area so I will not comment much more.
> I can just add that this could be another differentiator for Mercurial to
> have
> this possibility that others don't have.
> Note that this is possible with the "good old CVS": "cvs admin -m". OK, CVS
> might not be a model to persue though.
>
> >
> > Taking it further seems to me like taking it too far, and hurting the
> > immutable history principle. In fact, the ability to edit history
> > already leads me to the tendency spend a lot of time on tidying it up
> > that I really shouldn’t be spending, and is also actually pretty
> > dangerous, you can lose your changes with relative ease. (Hopefully with
> > the dead branches functionality it’ll be less dangerous.)
>
> I just want to comment that the extension does not alter the history
> immutability in any way. Just strip out the hgmessage branch with "hg
> clone -r" and you will restore your pristine history with all their
> original
> typos. Deactivating the extension does the same temporarily.
> In that way, this is much less invasive than histedit or MQ that will alter
> the SHA1 hash.
>
> Regards.
> Gilles.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>


Gilles,

thinking a bit more about this I thought that perhaps there is something
that can be done to appease those that view this as a way to "modify
history".

For example the extension could make hg log show a (*) at the beginning of
the "amended" commit messages, making it obvious that the commit message has
been changed.

I suggest "(*)" but any other similar marker could be used of course.
Perhaps you could even explicitly show the number of times that the commit
message has been amended.

Angel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110223/10d5e7d2/attachment.htm>


More information about the Mercurial-devel mailing list