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

  • 4
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值