Mercurial > hg
diff mercurial/commands.py @ 20767:bcfc4f625e57 stable
tag: save manually edited commit message into ".hg/last-message.txt"
Before this patch, manually edited commit message for "hg tag -e"
isn't saved into ".hg/last-message.txt" until it is saved by
"localrepository.savecommitmessage()" in "localrepository.commit()".
This may lose such commit message, if unexpected exception is raised.
This patch saves manually edited commit message for "hg tag -e" into
".hg/last-message.txt" just after user editing. This patch doesn't
save the message specified by -m option (-l is not supported for "hg
tag") as same as other commands.
This is the simplest implementation to fix on stable. Editing and
saving commit message should be centralized into the framework of
"localrepository.commit()" with "editor" argument in the future.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 19 Mar 2014 01:07:41 +0900 |
parents | b0153cb8b64e |
children | 03774a2b6991 |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Mar 19 01:07:41 2014 +0900 +++ b/mercurial/commands.py Wed Mar 19 01:07:41 2014 +0900 @@ -5694,6 +5694,7 @@ if opts.get('edit'): message = ui.edit(message, ui.username()) + repo.savecommitmessage(message) # don't allow tagging the null rev if (not opts.get('remove') and