所以我使用SharpSVN(SharpSvn.1.7-x86 1.7008.2243),我一直在遇到问题。每当我尝试在驱动器根目录上使用SvnWorkingCopyClient
(例如,我有D:\
驱动器,它本身就是回购)时,它会向我发出svn_dirent_is_absolute
错误。无法读取根
事实上唯一的命令,我可以发现,根本不在乎是SvnClient.GetUriFromWorkingCopy(string)
我如何能(移动我的工作拷贝,或链接上的文件系统除外)解决这个任何想法?我希望能够在代码中找到一种方法,或者可以选择解决此限制(因为SVN 1.7似乎不再具有此限制)。
这是一些代码?
private void fakeFunction(){
var RootPath="d:\";
using (var client = new SharpSvn.SvnClient())
using(var workingClient = new SvnWorkingCopyClient())
{
SvnWorkingCopyVersion workingVersion = null;
// Exception happens here
if (workingClient.GetVersion(this.RootPath, out workingVersion))
{
CurrentRevision = workingVersion.End;
// This will resolve just fine
var targetUri = client.GetUriFromWorkingCopy(RootPath);
var target = SvnTarget.FromUri(targetUri);
SvnInfoEventArgs info = null;
if (client.GetInfo(target, out info))
{
if (workingVersion.End != info.Revision)
{
System.Collections.ObjectModel.Collection<SvnLogEventArgs> logEventArgs = null;
if (client.GetLog(targetUri, out logEventArgs))
{
var oldBack = Console.BackgroundColor;
var oldFor = Console.ForegroundColor;
Console.BackgroundColor = ConsoleColor.DarkMagenta;
Console.ForegroundColor = ConsoleColor.White;
foreach (var l in logEventArgs)
{
Console.WriteLine("[{0}-{1}]-{2}", l.Revision, l.Author, l.LogMessage);
}
Console.BackgroundColor = oldBack;
Console.ForegroundColor = oldFor;
}
System.Console.WriteLine("Repo not up to date.");
}
}
}
}
}
我也是偶然发现这个http://subversion.tigris.org/issues/show_bug.cgi?id=3535和http://subversion.tigris.org/ds/viewMessage.do?dsForumId=463&viewType=browseAll&dsMessageId=2456472
所以,因为所发生遥想当年,不应该这不是一个问题了吗?
您的代码'变种ROOTPATH二线=‘d:\’ ;'不编译(这是你的实际源码?)。再往下看,你引用'this.RootPath',这是一个不同的变量,是你打算做什么? –
是的。那些在运行时填充,我只是显示路径设置为什么。 –
我在SharpSvn找到了这个问题的根本原因。它应该在下一个版本中修复。如果您可以在此处或作为[email protected]发布这个问题,这对我来说会容易得多。 因为异常输出的问题显示workingClient.GetVersion(“C:\\”,out q)更容易诊断那么您的完整示例。 –