svn: Can't revert without reverting parent

问题描述:

从svn上checkout代码时, 中途因为网络中断, 没有下载全全部代码, 于是就将那个没下载全的代码整个目录都删掉了. 当第二次重新启动myEclipse, 与资源库同步时, 发现在"Outgoing Mode"下有许多删除标志(减号)的代码, 右击这些代码, 点击还原时, 报出了如下错误

org.apache.subversion.javahl.ClientException: The operation can not be performed with the specified depth
svn: Can't revert 'E:\myeclipse_workspace\...' without reverting parent

org.apache.subversion.javahl.ClientException: The operation can not be performed with the specified depth
svn: Can't revert 'E:\myeclipse_workspace\...' without reverting parent\

在stackoverflow上找到类似的问题, 里面提到了svn revert的命令, 试用如下(FolderName为之前删除的目录)

E:\myeclipse_workspace\ProjectName\WebContent>svn -R revert FolderName
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: The working copy at 'E:\myeclipse_workspace\ProjectName'
is too old (format 29) to work with client version '1.9.2 (r1703836)' (expects format 31). You need to upgrade the working copy first.
结果显示本地client太老, 需要升级(我本地TortoiseSVN客户端是1.9.2版本, 而myEclipse中svn版本是1.7.10, svn命令是TortoiseSVN中提供的), 但是我又不想升级

继续看stackoverflow上的答案, 里面提到"The problem is that 'mydir' was not added to the SVN yet ", 这给了我灵感, 既然本地没有了整个目录, 如果重建之前删除的目录, 会不会有效果呢? 于是在项目对应的位置上, 右击, 新建了目录, 名称为之前删掉的FolderName(这时图标为一个x), 右击这个目录, 选择还原, Console上又欢快的checkout了, 至此问题得到解决!


感谢谷歌, 让我能找到类似的问题


stackoverflow问题链接: http://stackoverflow.com/questions/23675206/svn-cant-revert-mydir-without-reverting-parent

你可能感兴趣的:(svn: Can't revert without reverting parent)