Prevent commit to commit everything
Mads Kiilerich
mads at kiilerich.com
Thu Aug 12 12:54:58 UTC 2010
On 08/12/2010 02:08 PM, Harald Kirsch wrote:
> Hi all,
>
> in the software system I track with mercurial, file changes appear
> "automagically" after configuration through the GUI. I need to commit
> different directories with different commit messages and normally do
>
> hg commit -m '...' .
>
> Being a heavy svn user too, every so often I forget the trailing dot and
> everything is commited with a useless commit messages. Very annoying.
>
> I tried to use
>
> [defaults]
> commit = .
defaults are evil ...
> but these are obviously not defaults but additional arguments, meaning
> that the . even ends up in the command when I provide a different
> argument, e.g. just one specific file.
>
> Is there another way to handle this. It would suffice to me if hg
> plainly refuses to commit without an explicit argument.
>
> Any ideas?
You could put everything in .hgignore - but I'm not sure that would be a
good idea.
I have found that using a commit GUI (such as hgtk commit) or mq makes
it a lot easier to review and polish and commit exactly what I intended.
/Mads
More information about the Mercurial
mailing list