Mercurial (and others): How to read log message from STDIN
Thursday, 16 April 2015Use "tee" as editor:
$ (echo "Daily autocommit. Stats:"; hg diff | diffstat) | hg commit --config ui.editor=tee
Daily autocommit. Stats:
b/bar | 1 +
foo | 1 +
2 files changed, 2 insertions(+)