0

I use tortoise for svn. I want to update svn info by svn:keywords in my project files.

By adding this line to the respective file,

Repository path:    $HeadURL$

And adding "HeadURL" in the file tortoise properties(svn:keywords), I can show the URL of the svn in the server:

Repository path:    $HeadURL: http://svnserver.com/svn/aliaspooryorik/trunk/Application.cfc $

My question is that, how can I remove the server name/IP in the URL, like:

Repository path:    $HeadURL: /svn/aliaspooryorik/trunk/Application.cfc $

Thanks in advance.

4

2 回答 2

0

根据定义,URL 需要一个方案(http://部分)和一个“方案特定部分”(完整路径,包括服务器名称)。如果没有这两条信息,那HeadURL将是毫无意义的(而不是 URL)。

如果你真的需要这个,我建议不要处理关键字(使用svn export --ignore-keywords),或者对文件进行后处理以去除这些部分。

于 2013-09-10T13:26:04.530 回答
0

最后我发现,如果我更新客户端 svn 程序(乌龟)的版本,那么我可以利用关键字中的新功能。

也就是说,只需在关键字配置中将“URL”替换为“URL=%P”,那么我只有文件的地址而不是完整的 URL。

例如:

trunk/sampledir/samplefile.txt

代替

http://example.com/svn/projname/trunk/sampledir/samplefile.txt
于 2013-09-23T14:13:43.790 回答