org.tmatesoft.svn.core.SVNException: svn: E155007: 调用 doUpdate() 方法时,没有一个目标是工作副本

org.tmatesoft.svn.core.SVNException: svn: E155007: None of the targets are working copies while calling doUpdate() method

提问人:Guhan 提问时间:10/31/2023 最后编辑:Guhan 更新时间:11/1/2023 访问量:36

问:

因此,我正在尝试在使用 SVN Kit 提交文件之前更新我的存储库。所以我更新了我的存储库。但是当调用 doUpdate() 方法时,我收到以下错误。.我应该怎么做才能不出现此异常?svnUpdateClient.doUpdate(file, SVNRevision.HEAD, SVNDepth.INFINITY, false, false);org.tmatesoft.svn.core.SVNException: svn: E155007: None of the targets are working copies

这是最小的可重复示例。

//Updates the repository
SVNUpdateClient svnUpdateClient = clientManager.getUpdateClient();
svnUpdateClient.doUpdate(files, SVNRevision.HEAD, SVNDepth.INFINITY, false, false);

//adds the non working copy to the repository
SVNWCClient wcClient = clientManager.getWCClient();
wcClient.doAdd(file, false, false, false, SVNDepth.INFINITY, false, false);

//commits the added/modified copy to the repository
SVNCommitClient commitClient = clientManager.getCommitClient();
commitClient.doCommit(files, false, commitMessage, null, null, false, false, SVNDepth.INFINITY);
java svn svnkit

评论

0赞 bahrep 10/31/2023
也许提供您要更新的工作副本的路径?
0赞 Guhan 10/31/2023
文件的整个父路径而不是文件?
1赞 aled 10/31/2023
请提供一个最小的可重复示例
0赞 Guhan 11/1/2023
实际上我已经清除了异常。我犯的错误是在添加非工作副本之前尝试更新存储库。

答: 暂无答案