comparison mercurial/cmdutil.py @ 20771:434619dae569 stable

amend: save commit message into ".hg/last-message.txt" Before this patch, commit message (may be manually edited) for "commit --amend" is never saved into ".hg/last-message.txt", because it uses "localrepository.commitctx()" instead of "localrepository.commit()": saving into ".hg/last-message.txt" is executed only in the latter. This patch saves commit message for "commit --amend" into ".hg/last-message.txt" just after user editing. This is the simplest implementation to fix on stable. Editing and saving commit message for memctx should be centralized into the framework like "localrepository.commit()" with "editor" argument or so in the future.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 19 Mar 2014 01:07:41 +0900
parents b0153cb8b64e
children efbf15979538
comparison
equal deleted inserted replaced
20770:5d22cadd1938 20771:434619dae569
1780 user=user, 1780 user=user,
1781 date=date, 1781 date=date,
1782 extra=extra) 1782 extra=extra)
1783 if editmsg: 1783 if editmsg:
1784 new._text = commitforceeditor(repo, new, []) 1784 new._text = commitforceeditor(repo, new, [])
1785 repo.savecommitmessage(new.description())
1785 1786
1786 newdesc = changelog.stripdesc(new.description()) 1787 newdesc = changelog.stripdesc(new.description())
1787 if ((not node) 1788 if ((not node)
1788 and newdesc == old.description() 1789 and newdesc == old.description()
1789 and user == old.user() 1790 and user == old.user()