开发者

Checking commit message in TortoiseHG

开发者 https://www.devze.com 2023-03-24 20:11 出处:网络
I wonder if it is possible in TortoisHG, like in TortoiseSVN, to check if a commit message includes an issue id?

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

开发者_如何学C

Thanks in advance Jonas H.


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.


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

Checking commit message in TortoiseHG


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号