Changing the commit message Mercurial 1.6
Martin Geisler
mg at aragost.com
Fri Jul 2 14:41:10 UTC 2010
"Gaunet Sylvain (ASTEK)" <sylvain.gaunet at cnes.fr> writes:
> Hi,
>
> I have isntalled the last version on a test machine. I would like to
> change the commit message of a revision but this doesn't work, I have
> tried many things but nothings to do :
>
> gaunets at vancouver:~/DEV/MVCSUM/MVCSUM$ hg tags
> tip 0:7d5c6f902cd1
> 0.1 0:7d5c6f902cd1
> gaunets at vancouver:~/DEV/MVCSUM/MVCSUM$ hg log
> changeset: 0:7d5c6f902cd1
> tag: 0.1
> tag: tip
> user: S_Gaunet
> date: Fri Oct 23 16:52:23 2009 +0200
> summary: Algo a modif pour le renommage
>
> gaunets at vancouver:~/DEV/MVCSUM/MVCSUM$ hg tag --rev 0 -e -m "example"
> hg tag: invalid arguments
>
>
>
> Is this a bug ?
No, but I can see why this is confusing... When 'hg help tag' mention
the -e and -m command line options, then they refer to the commit
message used by the changeset that *adds the tag* -- not the changeset
you are tagging.
You cannot generally not modify a changeset in Mercurial. This includes
changing the commit message, the author,the timestamp, or the change
itself. All of those things are included in the computation that
determines the changesets identity -- it's hash value. In your case
above, this is the 7d5c6f902cd1 string.
If you change any of those things, then you'll get a different identity,
and so others wont recognize the changeset anymore.
In your particular case, I can see that the changeset in question is the
very first changeset -- number 0 (revealed by the number before the
colon in "0:7d5c6f902cd1"). So if you have made no other changesets
(except for the tag changeset), then you can just delete the .hg/
folder, do 'hg init' again and then make the commit again.
--
Martin Geisler
aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/
More information about the Mercurial
mailing list