Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从git到svn的子git用户映射使用了错误的用户名_Git_Git Svn_Bitbucket Server_Subgit - Fatal编程技术网

从git到svn的子git用户映射使用了错误的用户名

从git到svn的子git用户映射使用了错误的用户名,git,git-svn,bitbucket-server,subgit,Git,Git Svn,Bitbucket Server,Subgit,我使用subgit作为我们团队的svn镜像。用户映射可以正确地处理对svn repo的所有提交(在git repo上显示为相同的“作者”),但对git repo的提交在svn日志中显示为不同的“作者” 我按照说明在配置文件中启用了以下属性: [core] shared = true authorsFile = subgit/authors.txt [auth "default"] passwords = subgit/passwd 我明白了 我必须启用“pre-revpr

我使用subgit作为我们团队的svn镜像。用户映射可以正确地处理对svn repo的所有提交(在git repo上显示为相同的“作者”),但对git repo的提交在svn日志中显示为不同的“作者”

我按照说明在配置文件中启用了以下属性:

[core]
    shared = true
    authorsFile = subgit/authors.txt
[auth "default"]
   passwords = subgit/passwd
我明白了

我必须启用“pre-revprop change”钩子来允许svn:author更改

步骤:

  • 光盘
  • cd挂钩
  • mv pre-revprop-change.tmpl至pre-revprop change
  • 将以下内容添加到新文件
  • chmod 700改装前的道具更换
  • #!/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