SVN《修招》从命令行 [英] SVN "repair move" from the command-line

查看:35
本文介绍了SVN《修招》从命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 IDE 不知道我在使用 Subversion,并且每当我重命名类 (Java) 时,它都会重命名文件而不通知版本控制系统.我当然希望保留文件的历史记录.我知道在 TortoiseSVN 中有一个称为修复移动"的选项可以修复移动,但这不是一个选项,因为我使用的是 Ubuntu.有没有办法从命令行修复移动?

My IDE doesn't know that I use Subversion, and any time I rename a class (Java) it renames the file without notifying the version control system. I would of course like the file's history to be retained. I understand that in TortoiseSVN there is an option called "repair move" that fixes the move, but that's not an option since I'm on Ubuntu. Is there a way to repair the move from the command-line?

推荐答案

如果您记得文件的旧名称/位置:

If you remember the old name/location of the file:

mv new-filename old-filename
svn mv old-filename new-filename

当然,您需要安装 Subversion 命令行客户端,您可能已经安装了.如果没有,sudo aptitude install subversion subversion-client 应该可以解决问题.

You, of course, need the Subversion command-line client installed, which you probably have. If not, sudo aptitude install subversion subversion-client should do the trick.

根据您的评论,不,我不知道还有比这更简单的方法.如果您不确定旧文件名是什么,svn stat 可能会给您提示.

Per your comment, no, I don't know that there is an easier way than this. If you're not sure what your old filename was, svn stat may give you a hint.

这篇关于SVN《修招》从命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆