0
votes

For some reason, I don't need to always include a message when committing with TortoiseHG (and VisualHG).

However, TortoiseHG (following the command line syntax) will not allow it. As it is painful to write a space or a random letter each time, I was wondering if there is a way to include a default commit message (such as "update"), or making this message optional (at least in the GUI), without recompiling TortoiseHG :).

If you know of a solution for TortoiseSVN or TortoiseGit, it probably applies as well for TortoiseHG.

I am aware of Does Mercurial support empty commit messages? but it doesn't provide an answer for TortoiseHG (for the CLI jk.'s answer seems to work). As for "it's bad practice" comments, it is true in many cases but not all (imagine if Dropbox asked you each time anything changes to write a commit message)...

2
possible duplicate of Mercurial - Empty Commit Messagejk.
and I think it does provide an answer, see mine there for cmd line or for tortoise you will probably have to use patricks. I dont think you should be asking the question again just cos you don't like the answerjk.
The answers provided (including Patrick's and yours) did not answer the question of how to completely avoid commit messages, but I do appreciate your contribution.Erwin Mayer
for the command line mine does completely avoid the commit message, for tortoise there is no solution, on reflection this probably means this isn't a dup as this addresses thg while the other addresses hg, but I do disagree with your statement that all the other questions answers say is its bad practice.jk.
Thanks jk., I had misunderstood your answer (I thought you suggested an alias to reduce the amount of text to type, but not avoid it completely). I have updated my question accordingly.Erwin Mayer

2 Answers

2
votes

There's no way to do that in the current version of TortoiseHg. You would have to submit a patch upstream, modifying the behavior. You can see this for yourself in the TortoiseHg source code: https://bitbucket.org/tortoisehg/thg/src/0e6a0b894e70/tortoisehg/hgqt/commit.py#cl-670

1
votes

You cannot have an empty commit message in Mercurial, it's simply not supported by the file format. Teaching TortoiseHg to use a template is another thing and you can try opening an issue for this.