[英]subgit user mapping from git to svn uses wrong usernames
I am using subgit as svn mirror for our team. 我正在使用subgit作为我们团队的svn镜像。 user mapping works correctly for all commits done to svn repo (Shows up as same "Author" on git repo), but commits done to git repo show up as different "Author" in svn logs. 用户映射对完成对svn repo的所有提交均正确工作(在git repo上显示为相同的“作者”),但对git repo的完成显示为svn日志中的不同“作者”。
I followed the instructions and enabled following properties in my config file: 我按照说明进行操作,并在配置文件中启用了以下属性:
[core]
shared = true
authorsFile = subgit/authors.txt
[auth "default"]
passwords = subgit/passwd
Figured it. 想通了。
I had to enable "pre-revprop-change" hook to allow svn:author changes. 我必须启用“ pre-revprop-change”挂钩才能允许svn:author更改。
Steps: 脚步:
#!/bin/bash
#Sample PRE-REV-CHANGE HOOK
REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"
# Allowing user to modify author on revisions
if [ "$PROPNAME" = "svn:author" ]; then exit 0; fi
echo "Enabling subgit to chnage author name for git-svn user mapping" >&2
exit 1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.