Mercurial > hg
comparison hgext/histedit.py @ 20770:5d22cadd1938 stable
histedit: save manually edited commit message into ".hg/last-message.txt"
Before this patch, manually edited commit message for "fold" command
in histedit-ing 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 manually edited commit message for "fold" command in
histedit-ing 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 | 4778f398ec83 |
children | efbf15979538 a0f437e2f5a9 |
comparison
equal
deleted
inserted
replaced
20769:1e686e55780c | 20770:5d22cadd1938 |
---|---|
292 filectxfn=filectxfn, | 292 filectxfn=filectxfn, |
293 user=user, | 293 user=user, |
294 date=date, | 294 date=date, |
295 extra=extra) | 295 extra=extra) |
296 new._text = cmdutil.commitforceeditor(repo, new, []) | 296 new._text = cmdutil.commitforceeditor(repo, new, []) |
297 repo.savecommitmessage(new.description()) | |
297 return repo.commitctx(new) | 298 return repo.commitctx(new) |
298 | 299 |
299 def pick(ui, repo, ctx, ha, opts): | 300 def pick(ui, repo, ctx, ha, opts): |
300 oldctx = repo[ha] | 301 oldctx = repo[ha] |
301 if oldctx.parents()[0] == ctx: | 302 if oldctx.parents()[0] == ctx: |