Search code examples
mercurialtortoisesvncommittortoisehgvisualhg

How can I make the commit message optional or a default in TortoiseHG (Mercurial)?


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)...


Solution

  • 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