For example:
HG: Enter commit message. Lines beginning with 'HG:' are removed.
HG: Leave message empty to abort commit.
HG: --
HG: user: romkyns
HG: branch 'default'
HG: UNTRACKED FILE: NewFile.xaml
HG: UNTRACKED FILE: NewFile.xaml.cs
HG: changed MainWindow.xaml.cs
HG: changed Settings.cs
Obviously adding those untracked files would still be optional, but hopefully this will significantly reduce the number of times I push commits with missing files.
Is there some easy way to achieve this?
Not easily, but you can indeed do it with a bit of work.
When you run hg commit
without a given message, Mercurial will choose an editor to use based on a few things, mainly the HGEDITOR
environement variable and the ui.editor
configuration setting from your hgrc
.
If you point this to a script that will generate the commit message your want before running your editor of choice, you would get the expected result. The Mercurial wiki has an article about making this work but it will only work on Mac/Linux unless you have bash
(or some other Unix shell) running on Windows. If you know batch scripting or Powershell it should be too hard however.