1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #3337 duplicate

Default commit message

Robert Važan
created an issue

Add configuration option that will allow users to specify default commit message in commit dialog. This is useful for some types of projects where commits are frequent and commit messages are unnecessary.

A quick commit without even opening the commit dialog would be also nice, but that feature deserves its own issue.

Comments (5)

  1. Angel Ezquerra

    I don't think this is a very good idea, and I doubt we will add that particular feature.

    That being said, you can already achieve something similar to what you want today, by configuring a "tool". Just go to Settings / Tools, and add a new tool which calls hg commit with the proper message. Then add it to the toolbar and run it whenever you want.

    The only limitation is that the command will probably just commit all modified (or added/removed) files. You cannot make it just commit the checked files. However that does not seem a big issue if you do not even want to specify a commit message.

  2. Robert Važan reporter

    Actually I want to see the list of modified files and their diffs in order to review what I am committing. I just don't want to record the commit message.

    I am somewhat reluctant to explain why I want it, because my reasons could attract unhelpful religious arguments about how projects should be run, but maybe a little explanation will help you to imagine the use case. For my personal projects, I realized that years of dutiful commit commenting have zero impact on my productivity today. It was just a waste of time that I am now trying to optimize out. Even for corporate projects, it is a bad practice to hide important information in revision history. Important things should be commented directly in code. That means the commit messages contain redundant information that is rarely used and even more rarely found useful.

  3. Robert Važan reporter

    You are however right in that this feature begs for a bunch of related streamlining features, e.g. automatically marking files for addition/removal, automatically detecting renames, or even generating commit message out of the changeset. Some projects could be even committed automatically at intelligently chosen points in time. It's a completely different workflow that TortoiseHg wasn't designed for. I am aware of SparkleShare, but I don't want to go that far with source code, because I do browse the history occasionally and I need it to contain reasonably sized chunks of work.

  4. Steve Borho

    HINT: The commit tool will load the contents of .hg/cur-message.txt or .hg/last-message.txt on startup. Unfortunately, both are overwritten or removed after commits so you would need to add a post-commit hook that wrote a new copy of the file.

  5. Log in to comment