所以我使用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)更容易診斷那麼您的完整示例。 –