【发布时间】:2022-09-22 21:10:08
【问题描述】:
我想在提交消息中使用一些前缀标签,以便在查看修订日志时快速识别提交类型,并能够快速过滤日志。
我打算使用的一些前缀是 (标签:, 合并:, 测试:, 稳定:, TRUE-UP:, FIX():, FEATURE():,可能还有其他人)。
此外,对于标签,我想将默认消息更改为更具描述性,如下所示:
TAG: Added tag v3.4 for e90d0caa766 created on 2022-09-22 01:05:00
Applied fix for foobar.
对于标记,Mercurial 似乎没有打开编辑器,所以我可以检查标记消息,所以我调试它的尝试很乏味。
我尝试将以下内容添加到我的 repo hgrc 配置文件中:
[committemplate]
changeset.tag = \"TAG: Added tag {tag} for {node|short} created on {date|isodate}\\n{desc}\"
我也玩过[hooks] 部分和pretag 钩子。
此外,我在命令行上尝试过各种格式调整:
hg tag -r . -m \'TAG: Added tag {tag} for {node|short} created on {date|isodate}\\n{desc}\' test4
对于上面的命令行尝试,这些都不会填充消息中的模板字段,而对于 hgrc 配置文件中的其他尝试,这不会改变提交消息,甚至不会出错。
我在这里想念什么?
标签: version-control mercurial config customization tagging