我正在使用 SharpSvn 库。我想检查我在本地拥有的文件是否与颠覆服务器上的文件相同。有谁知道我是怎么做到的?目前这是我正在尝试做的,但它说“无法连接到 URL 上的存储库”
public bool IsDirectoryTheSame(string folderpath)
{
var IsSameDirectory = false;
var installfolderlocal = GetInstallationFolder(folderpath);
using (SvnClient svnClient = new SvnClient())
{
SvnUriTarget target1 =
new SvnUriTarget(
new Uri(string.Format("{0}{1}", svnclientpath, folderpath)));
SvnUriTarget target2 =
new SvnUriTarget(
new Uri(installfolderlocal));
using(var stream = new MemoryStream())
{
IsSameDirectory = svnClient.Diff(target1,target2,stream);
}
}
return IsSameDirectory;
}