Sharpsvn 并未指定所有必需的修订
我正在尝试使用 SharpSVN 进行合并。 经过一些研究,我了解到 SharpSVN 支持 MergDiff 函数,但是当我尝试使用下面列出的代码时,我收到一条错误消息,提示未指定所有必需的修订。
谢谢
try
{
SvnCheckOutArgs argsSVNCheckout = new SvnCheckOutArgs();
SvnUpdateResult result;
SvnTarget _rootSVNTarget = null; // = new SvnTarget();
string serverUrl = "http://svn.snaffpaw.com:8080/CPM Creator/";
// The Subversion target to run log against
SvnTarget target = null;
// Attempt to create an SvnTarget by parsing the targetPath
if (string.IsNullOrEmpty(targetPath) ||
!SvnTarget.TryParse(targetPath, out target))
if (string.IsNullOrEmpty(serverUrl) || (!SvnTarget.TryParse(serverUrl,out _rootSVNTarget)))
//SvnStatusArgs argSVN = new SvnStatusArgs();
//argSVN.RetrieveRemoteStatus = true;
//Collection<SvnStatusEventArgs> infos;
//bool isChecked = client.GetStatus(targetPath, argSVN, out infos);
// Attempt to create an SvnTarget by parsing the targetPath
if (string.IsNullOrEmpty(targetPath) ||
!SvnTarget.TryParse(targetPath, out target))
if (string.IsNullOrEmpty(serverUrl) || !SvnTarget.TryParse(serverUrl, out _rootSVNTarget))
client.Authentication.DefaultCredentials = new NetworkCredential("guest", "guestpwd");
client.DiffMerge(targetPath, _rootSVNTarget, target); //<<<-- errors here
}
// ...
I am attempting to do a merge using SharpSVN. A bit of research and I have learned the SharpSVN supports the MergDiff function, however when I attempt the code as listed below I am getting an error message of not all required revisions are specified.
Thanks
try
{
SvnCheckOutArgs argsSVNCheckout = new SvnCheckOutArgs();
SvnUpdateResult result;
SvnTarget _rootSVNTarget = null; // = new SvnTarget();
string serverUrl = "http://svn.snaffpaw.com:8080/CPM Creator/";
// The Subversion target to run log against
SvnTarget target = null;
// Attempt to create an SvnTarget by parsing the targetPath
if (string.IsNullOrEmpty(targetPath) ||
!SvnTarget.TryParse(targetPath, out target))
if (string.IsNullOrEmpty(serverUrl) || (!SvnTarget.TryParse(serverUrl,out _rootSVNTarget)))
//SvnStatusArgs argSVN = new SvnStatusArgs();
//argSVN.RetrieveRemoteStatus = true;
//Collection<SvnStatusEventArgs> infos;
//bool isChecked = client.GetStatus(targetPath, argSVN, out infos);
// Attempt to create an SvnTarget by parsing the targetPath
if (string.IsNullOrEmpty(targetPath) ||
!SvnTarget.TryParse(targetPath, out target))
if (string.IsNullOrEmpty(serverUrl) || !SvnTarget.TryParse(serverUrl, out _rootSVNTarget))
client.Authentication.DefaultCredentials = new NetworkCredential("guest", "guestpwd");
client.DiffMerge(targetPath, _rootSVNTarget, target); //<<<-- errors here
}
// ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如 SharpSvn 用户列表中所述,以下示例可以解决
缺少修订版本:
错误是传递的 Uris 没有默认为 HEAD 修订版本,而是必须显式使用 head 修订版本。
此问题在 http://sharpsvn.net/daily/ 上提供的当前每日构建中已修复
As noted on the SharpSvn user list the following example would have resolved the
missing revisions:
The error was that the passed Uris didn't default to the HEAD revision, but had to use the head revision explicitly.
This is fixed in the current daily build available on http://sharpsvn.net/daily/