git commit --verbose equivalent in mercurial?
git, mercurial
Solution
Short answer: There is no `git commit --verbose` equivalent in mercurial, but it's possible to hack it in.
The edit text is hard-coded in the mercurial source, so no plugin or configuration can directly change it.
The best you can do is to hack the ui.editor setting in your hgrc to add text into the editor directly. I made a script called hg-commit-editor:
#!/bin/sh
echo 'HG: ------------------------ >8 ------------------------' >> $1
hg diff >> $1
editor $1
exit $?
and then set it as my commit editor in my hgrc:
[ui]
editor = hg-commit-editor
This appends the output of "hg diff" to the bottom of the edit text file after a special line (source) so it's not included as part of the commit message.
Problem
In git, I can do "git commit --verbose" to show me a diff right there in the message editor. I don't see any option for it in mercurial. Is there a mercurial plugin to show me a diff in the message editor or anything similar?