Wishlist: the ability to correct wrong commit messages.

Scott Palmer swpalmer at gmail.com
Mon Jul 1 19:34:48 UTC 2019


> On Jul 1, 2019, at 3:11 PM, Richard Hipp <drh at sqlite.org> wrote:
> 
>> On 7/1/19, Scott Palmer <swpalmer at gmail.com> wrote:
>> 
>> Tampering with the commit message can be
>> harmful as it can mislead people or automated processes that depend on it.
> 
> I understand that point of view, and partially agree with it. But I
> look at it slightly differently. Mistakes happen. Mistakes also happen
> in historical paper-and-ink accounting, and in that context, the
> procedure is to mark (but not erase!) the erroneous entry, then
> provide a separate correction.  In my view, this is exactly what
> adding a comment-edit tag does.  It does not remove the original
> check-in description - it merely marks the original description as
> being wrong and provides a correction.
> 
> Both the original text and the correction are still available, though
> the common practice is to omit the original unless requested.
> 
> Here is an actual example of this happening in Fossil a couple of weeks ago:
> 
>     https://www.fossil-scm.org/fossil/info/f23d509b4866d380
> 
> Jan made a fix, but put some incorrect version numbers in the
> description.  So later he went in and added a tag to fix the
> description.  Both the original and the revision are shown in the
> detailed check-in information above.  On the other hand, if you view a
> more compact history, only the corrected text is seen.  Ex:
> 
>    https://www.fossil-scm.org/fossil/timeline?c=f23d509b4866d380&n=12
> 
> (Technical details for those who want to dig deeper:  The original raw
> check-in artifact with the incorrect description is at
> (https://www.fossil-scm.org/fossil/artifact/f23d509b4866d380) and the
> raw tag artifact that provided the amended description  is
> (https://www.fossil-scm.org/fossil/info/a33212d8128bd360)).
> 
> An alternative might be to show the original description, but add a
> notation that the description was subsequently amended.  Or show the
> revised text, but mark it clearly to show that it is not the original
> text.  There is lots of room to adjust policy here, to keep within the
> bounds of historical Mercurial practice.
> 
> I don't want to come across as pushing an agenda.  I'm not a Mercurial
> guy, and I don't have a dog in this race.  I just want y'all to be
> successful, and I think if you had a mechanism to provide a post-push
> correction to check-in comments, that would be a big plus for
> Mercurial.  And, I wanted to make you aware of a possible technical
> solution that has worked well in Fossil for 12 years. But the decision
> is entirely up to you, and I will not think less of you if you choose
> not to pursue it.

I think you can accomplish what you’re after simply by setting your repositories to non-publishing and using the evolve extension. 

That way the “phase” of your commits won’t become public when you push, allowing them to be superseded. The original commits will then become “obsolete” and will not show by default in the changeset graph. 

Don’t be scared of the evolve extension. Read up on it and the Mercurial concept of changeset obsolescence and I think you will see that it’s a good fit. 

Regards,

Scott


More information about the Mercurial mailing list