immutable commit messages, why?
Will Maier
willmaier at ml1.net
Thu Mar 20 06:36:57 CDT 2008
On Thu, Mar 20, 2008 at 11:30:27AM +0100, Martin Geisler wrote:
> Put that way, then I agree with you. Currently you cannot do a commit if
> nothing has changed, but if that was allowed, then I could imagine that
> empty commits would be a way to amend the commit messages:
>
> hg status
> M foo.c
> hg commit -m 'Fixed bug.' # Bad commit message.
> hg commit -f -m 'Fixed bug 123.' # Better message.
Is there some reason rollback or mq aren't applicable here?
$ hg status
M foo.c
$ hg ci -m "Fixed bug."
$ hg rollback
rolling back last transaction
$ hg ci -m "Fixed bug 123."
$ hg log
changeset: 1:26c742b34bdd
tag: tip
user: Will Maier <willmaier at ml1.net>
date: Thu Mar 20 06:33:21 2008 -0500
summary: Fixed bug 123.
changeset: 0:6f0982b7d84e
user: Will Maier <willmaier at ml1.net>
date: Thu Mar 20 06:32:57 2008 -0500
summary: Added foo.c.
$ hg qimp -r0:tip
$ hg qapp
0.diff
1.diff
$ hg qpop 0.diff
Now at: 0.diff
$ hg qref -m "Added foo.c, which is awesome."
$ hg qpush -a
applying 1.diff
Now at: 1.diff
$ hg qrm -r 0.diff -r 1.diff
$ hg log
changeset: 1:316b4a9be1d2
tag: tip
user: Will Maier <willmaier at ml1.net>
date: Thu Mar 20 06:33:21 2008 -0500
summary: Fixed bug 123.
changeset: 0:d3116b379999
user: Will Maier <willmaier at ml1.net>
date: Thu Mar 20 06:32:57 2008 -0500
summary: Added foo.c, which is awesome.
--
[Will Maier]-----------------[willmaier at ml1.net|http://www.lfod.us/]
More information about the Mercurial
mailing list