如何在 Eclipse 中从 CVS 恢复以前的更新
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4339331/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to revert previous updates from CVS in eclipse
提问by Rachel
Our Project is using CVS
and its is integrated from eclipse
and so we use Team Synchronizing
to get the latest code from CVS but is there a way to revert the previous commit or update from repositry which we have done ?
我们的项目正在使用CVS
并且它是集成的eclipse
,所以我们用来Team Synchronizing
从 CVS 获取最新的代码,但是is there a way to revert the previous commit or update from repositry which we have done ?
I come from git
background and so I am having hard time to find out this functionality from eclipse/cvs
, any suggestion would be highly apprecaited.
我来自git
背景,所以我很难从 中找到这个功能eclipse/cvs
,任何建议都会受到高度赞赏。
回答by VonC
It depends what you mean by "revert".
The git revert
actually add a new commit canceling the changes introduced by the previous one.
这取决于您所说的“恢复”是什么意思。
在git revert
实际添加一个新的提交取消由前一个引入的变化。
With Eclipse, that would be (file by file): "Replace With -> History
"
(see "How to properly roll back to an older version in CVS HEAD using Eclipse?")
使用 Eclipse,这将是(逐个文件):“ Replace With -> History
”
(请参阅“如何使用 Eclipse 在 CVS HEAD 中正确回滚到旧版本?”)
And then make a new commit.
In other word, there don't seem to be any simpleway to do this (when many files are impacted)...
然后进行新的提交。
换句话说,似乎没有任何简单的方法可以做到这一点(当许多文件受到影响时)......
回答by NPE
Right click on the file -> Team -> Revert to Base. This will overwrite any local changes and revert to the most up-to-date version of the file in CVS.
右键单击文件 -> 团队 -> 恢复到基地。这将覆盖任何本地更改并恢复到 CVS 中文件的最新版本。
Any this what you're after? (I have to admit that I find the question somewhat unclear)
这是你追求的吗?(我不得不承认我觉得这个问题有点不清楚)
回答by Daniel Schneller
If you mean it in the sense of uncommittingsomething you committed before, erasing it from the history of the file, then no, you cannot do that.
如果您的意思是取消提交您之前提交的某些内容,将其从文件的历史记录中删除,那么不,您不能这样做。
You can only get the previous version back from the repository and commit that again, making it clear in the comment that you reverted the file to a previous revision.
您只能从存储库中取回先前的版本并再次提交,并在注释中明确表示您已将文件恢复为先前的修订版本。