2011-03-16 42 views
1

使用sharpsvn我想搜索我们svn服务器中提交的文件的所有评论为特定的字符串。sharpsvn搜索存储库提交

但我不能得到这个工作。我尝试了以下方法,但它不喜欢我的目标路径。

Error: Revision type requires a working copy path, not a URL

SvnRevisionRange range = new SvnRevisionRange(SvnRevision.Working, SvnRevision.Zero); 
string targetPath = "http://********:81/svn/"; 
Collection<SvnLogEventArgs> items; 
SvnLogArgs args = new SvnLogArgs { Range = range }; 
client.GetLog(new Uri(targetPath), args, out items); 

任何想法将是巨大的

回答

0

这是因为你使用:

new SvnRevisionRange(SvnRevision.Working, SvnRevision.Zero) 

它不能确定你的工作拷贝的版本号时,你只是通过一个URL 。

尝试使用SvnRevision.Head即可在存储库中获取最新版本