SubGit:使用svn.svnCommitMessage选项 [英] SubGit: use svn.svnCommitMessage option

查看:54
本文介绍了SubGit:使用svn.svnCommitMessage选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SubGit 3.2.4发行说明中仅看到此功能:

Just seen this feature in the SubGit 3.2.4 release notes:

支持svn.gitCommitMessage和svn.svnCommitMessage选项,这些选项允许指定在生成提交消息时SubGit使用的消息模式.

Support for svn.gitCommitMessage and svn.svnCommitMessage options that allow specifying message patterns used by SubGit while generating commit messages.

但是我找不到关于语法的任何示例.我想一次导入,所以我想运行

But i cannot find any example on the syntax. I want to do a one time import, so i guess i run

subgit configure SVN_REPO repo.git

然后编辑 repo.git/subgit/config 并将 gitCommitMessage 添加到 svn 部分.但是我可以使用哪些变量/占位符?

then edit repo.git/subgit/config and add gitCommitMessage to the svn section. But what are the variables/placeholders i can use?

推荐答案

以下是可以使用的占位符:

Here are the placeholders that can be used:

  • %author = Git作者(双向可用)
  • %committer = Git提交者(双向可用)
  • %date =修订或提交的日期(双向可用)
  • %message =原始消息(双向可用)
  • %note = Git提交注释存储在refs/notes/commits(在Git => SVN方向可用)
  • %note(refs/notes/namespace)=存储在refs/notes/namespace中的Git提交注释(在Git => SVN方向可用)
  • %commit = Git提交哈希(在Git => SVN方向可用)
  • %svnUser = Subversion用户名(双向可用)
  • %revision = Subversion版本,您的符号形式的GRN(在SVN => Git方向可用)
  • %branch = Subversion分支(双向可用)
  • \ n =换行符(双向可用)

示例:

[svn]
svnCommitMessage = "%message\n\nr%revision %branch"

[svn]
svnCommitMessage = "%message\n%note(refs/notes/test)\n\nr%revision %branch"

这篇关于SubGit:使用svn.svnCommitMessage选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆