jonash
jonash

Reputation: 103

Checking commit message in TortoiseHG

I wonder if it is possible in TortoisHG, like in TortoiseSVN, to check if a commit message includes an issue id? In TortoiseSVN you could set the bugtraq properties on the repo to make a dialog box pop up and warn if an id was not included, and I am looking for a way to do the same thing (still need it to be possible to check in, just show a warning that id is not included and be able to abort the commit if you want to).

Thanks in advance Jonas H.

Upvotes: 4

Views: 984

Answers (3)

Mark Tolonen
Mark Tolonen

Reputation: 178055

This dialog in TortoiseHg 2.4's settings looks like what you want:

enter image description here

Upvotes: 1

Christoph Jüngling
Christoph Jüngling

Reputation: 1100

I only know about the setting issue.linkmandatory = True which forces entry of an issue reference specified in issue.regex and issue.link on every commit.

Upvotes: 0

Christian Specht
Christian Specht

Reputation: 36451

As far as I know, nothing like that is possible directly in TortoiseHG.
But TortoiseHG is only a GUI for Mercurial, and in Mercurial, you can do stuff like that with hooks.

See chapter 10 in the HG book for a general desription of what hooks are and how they work:
Handling repository events with hooks

There is even a specific example in this chapter that rolls back a commit if it doesn't contain a bug id.

Upvotes: 1

Related Questions