如何使用 SharpSvn 区分 Svn 存储库
我的问题非常简单,使用 SharpSvn Api,它也应该很容易。这是我所做的:
path = "c:\project";
using (SvnLookClient client = new SvnLookClient())
{
SvnLookOrigin o = new SvnLookOrigin(path);
Collection<SvnChangedEventArgs> changeList;
client.GetChanged(o, out changeList); // <-- Exception
}
当我调用 GetChanged 时,出现异常:
无法打开文件“c:\project\format”:系统找不到指定的文件。
那么,也许我缺少什么?或者也许这不是找出本地存储库中修改的文件和文件夹列表的正确方法?
提前致谢。
My question is quite simple and with the SharpSvn Api, it should be easy as well. Here what I did:
path = "c:\project";
using (SvnLookClient client = new SvnLookClient())
{
SvnLookOrigin o = new SvnLookOrigin(path);
Collection<SvnChangedEventArgs> changeList;
client.GetChanged(o, out changeList); // <-- Exception
}
and when I call the GetChanged, I get an exception:
Can't open file 'c:\project\format': The system cannot find the file specified.
So, Maybe there is something I'm missing? Or maybe it's not the right way to do find out the list of files and folders that were modified in the local repository?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SharpSvn 中的 SvnLookClient 类相当于“svnlook”控制台应用程序。它是一个低级工具,使存储库挂钩能够使用直接文件访问来查看存储库的特定事务。
您可能希望使用 SvnClient 类来查看workingCopy 及其 Status(),或者在某些情况下更简单的 GetStatus() 函数来查看发生了什么变化。
The SvnLookClient class in SharpSvn is the equivalent to the 'svnlook' console application. It is a low level tool that enables repository hooks to look into specific transactions of a repository using direct file access.
You probably want to use the SvnClient class to look at a WorkingCopy and most likely its Status() or in some cases simpler GetStatus() function to see what changed.
SvnLookOrigin 构造函数想要的路径实际上是:
也就是说,它想要特殊的“.svn”目录,而不仅仅是签出源的根目录。
虽然你可能确实想听 Bert 的讲话并做一些类似的事情:
The path that the SvnLookOrigin constructor wants is actually:
That is, it wants that special ".svn" directory not just the root of where the source is checked out to.
Although you probably do want to listen to Bert and do something like: