1

我已经编写了一个批处理脚本来使用 Windows 命令行 SVN 进行两个修订之间的差异。目录名有一个空格(我在诅咒开发人员创建一个带空格的目录名)。

SVN 版本:1.7
操作系统:Windows XP

例如,/svnrepo/xyz/project/ C# 代码/files/

问题在于 C# 代码目录名称,我假设空间导致问题 - 当我尝试运行 diff 命令时,输出非常不寻常:

svn diff -r633:700 /svnrepo/xyz/project/***C# Code***/files/

A /svnrepo/xyz/project/ C%23%20Code /files/

我该如何纠正这个问题?

我希望得到如下输出:

A /svnrepo/xyz/project/C# Code/files/ 这样我就可以将输出写入某个文本文件。

PS:我是 Linux 人。并且是批处理脚本的新手。

4

1 回答 1

2

There is no "issue". That's standard URL character encoding (%23 means hex 23 or 0x23, which is decimal 35, which is the ASCII code for #, and %20 is hex 20 or 0x20, which is decimal 32, which is the ASCII code for a space character). You see the same thing in the address bar of your web browswer if you try to navigate to a URL that has those characters as part of the site address.

To log the differences to a file, just use command-line redirection:

svn diff -r633:700 /svnrepo/xyz/project/C# Code/files/ > diffs.txt
于 2013-05-21T19:02:23.017 回答