Wishlist: the ability to correct wrong commit messages.
Richard Hipp
drh at sqlite.org
Mon Jul 1 19:11:44 UTC 2019
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.
--
D. Richard Hipp
drh at sqlite.org
More information about the Mercurial
mailing list