git svn的作者文件格式是什么,特别是反斜杠或下划线等特殊字符? [英] What is the format of an authors file for git svn, specifically for special characters like backslash or underscore?

查看:284
本文介绍了git svn的作者文件格式是什么,特别是反斜杠或下划线等特殊字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图克隆 Papercut,一个smtp服务器模拟器



我使用 svn log -q https://papercut.svn.codeplex.com/svn | grep -e'^ r'| awk'BEGIN {FS =|}; {print $ 2}'| sort | uniq 这是给我的

  RNO \_MCLWEB 
SND\krobertson_cp

我创建了作者.txt与 SVN_User =用户名<电子邮件> 格式,但是当我运行

  git svn clone --no-metadata -A authors.txt https://paper.wordpress.com.svn.codeplex.com/svn papercut 

它抱怨作者:RNO \_MCLWEB没有在authors.txt文件中定义



我试着把一个\\ \\''和'_'之前尝试转义它们,并在名称周围添加引号,但都无效。

我找不到任何更好的描述authors.txt文件格式比 SVN_User = UserName< Email>

解决方案

我不想成为那个人,但我只是试了一下,它对我来说工作得很好。以下是我使用的作者文件的副本:

  RNO \_MCLWEB = Ronald McDonald< dude@example.com> 
SND\krobertson_cp =一些Guy< someone@example.com>

然而,我的确使用了一种与生成作者姓名略有不同的方法, href =http://progit.org/book/ch8-2.html =noreferrer>这些方向。我的具体咒语是:

  $ svn log --xml | grep作者| sort -u | perl -pe's /.& gt;(。?)< ./$ 1 = /'

我也使用Git 1.6.6.1(怀疑是有所作为,但你永远不知道)。

我注意到当我使用你的管道获取SVN作者,结果文件中的SVN用户名前面有空格(即每行的第1列有空格)。不知道这是否有所作为。


I am trying to clone Papercut, an smtp server emulator

I'm getting the list of SVN authors with svn log -q https://papercut.svn.codeplex.com/svn | grep -e '^r'| awk 'BEGIN {FS="|"};{print $2}'|sort|uniq which is giving me

RNO\_MCLWEB
SND\krobertson_cp

I created an authors.txt with the SVN_User = UserName <Email> format, but when I run

git svn clone --no-metadata -A authors.txt https://papercut.svn.codeplex.com/svn papercut

it complains "Author: RNO\_MCLWEB not defined in authors.txt file"

I've tried with putting a \ before the '\' and '_' to try to escape them, and adding quotes around the name, but neither worked.

I can't find any better description of the authors.txt file format than SVN_User = UserName <Email>

解决方案

I hate to be "that guy", but I just gave it a try and it worked fine for me. Here's the copy of the authors file I used:

RNO\_MCLWEB = Ronald McDonald <dude@example.com>
SND\krobertson_cp = Some Guy <someone@example.com>

I did, however, use a slightly different method than you did to generate author names, following these directions. My specific incantation was:

$ svn log --xml | grep author | sort -u | perl -pe 's/.>(.?)<./$1 = /'

I'm also using Git 1.6.6.1 (doubt that makes a difference, but you never know).

I did notice that when I used your pipeline to get the SVN authors, there were spaces in front of their SVN usernames in the resulting file (i.e., there was a space in column 1 on each line). Don't know if that makes a difference or not.

这篇关于git svn的作者文件格式是什么,特别是反斜杠或下划线等特殊字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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