用乌龟SVN恢复 [英] reverting with tortoise SVN

查看:33
本文介绍了用乌龟SVN恢复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在 TortoiseSVN 中查看 Subversion 日志

If I view the Subversion log in TortoiseSVN

当我选择一个修订并单击鼠标右键时,我会看到以下选项(以及其他选项):

When I select a revision and right-click, I see the following options (among others):

  • 将项目更新为修订版
  • 恢复到此修订版
  • 恢复本次修订的更改

谁能解释一下这三个之间的区别是什么?

Can someone explain what are the differences between these 3?

我真正想做的是暂时将我的工作副本恢复到所选版本的存储库.我应该选择这些选项中的哪一个?

What I actually want to do is temporarily revert my working copy back to the selected version of the repository. Which of these options should I choose?

推荐答案

您应该选择第二个选项.

You should choose the second option.

当您单击此对话框中的帮助"按钮时,您会看到以下内容:

Here's what you get when you click on the Help button in this dialog:

将项目更新为修订版

将您的工作副本更新为选定的修订.如果您想让您的工作副本反映时间,则很有用在过去,或者如果有进一步提交到存储库并且您想一次更新您的工作副本.这是最好在您的工作副本中更新整个目录,而不仅仅是一个文件,否则您的工作副本可能会不一致.

Update your working copy to the selected revision. Useful if you want to have your working copy reflect a time in the past, or if there have been further commits to the repository and you want to update your working copy one step at a time. It is best to update a whole directory in your working copy, not just one file, otherwise your working copy could be inconsistent.

如果您想永久撤消先前的更改,请使用还原到此改版.

If you want to undo an earlier change permanently, use Revert to this revision instead.

恢复到此修订版

恢复到较早的版本.如果你有做了一些改变,然后决定你真的想回去关于修订版 N 中的情况,这是您需要的命令.这更改在您的工作副本中被撤消,因此此操作不会影响存储库,直到您提交更改.请注意,这将撤消所选修订后所做的所有更改,替换较早版本的文件/文件夹.

Revert to an earlier revision. If you have made several changes, and then decide that you really want to go back to how things were in revision N, this is the command you need. The changes are undone in your working copy so this operation does not affect the repository until you commit the changes. Note that this will undo all changes made after the selected revision, replacing the file/folder with the earlier version.

如果您的工作副本处于未修改状态,在您执行此操作后您的工作副本将显示为已修改.如果你已经有本地更改,此命令会将撤消更改合并到您的工作副本.

If your working copy is in an unmodified state, after you perform this action your working copy will show as modified. If you already have local changes, this command will merge the undo changes into your working copy.

内部发生的事情是 Subversion 执行反向操作合并选定修订后所做的所有更改,撤消之前提交的效果.

What is happening internally is that Subversion performs a reverse merge of all the changes made after the selected revision, undoing the effect of those previous commits.

如果在执行此操作后您决定要撤消撤消并将您的工作副本恢复到以前的未修改状态,你应该使用 TortoiseSVN → 从 Windows 资源管理器中恢复,这将丢弃此反向合并所做的本地修改行动.

If after performing this action you decide that you want to undo the undo and get your working copy back to its previous unmodified state, you should use TortoiseSVN → Revert from within Windows Explorer, which will discard the local modifications made by this reverse merge action.

如果您只想查看文件或文件夹在较早的修订版,使用更新修订版或将修订版另存为...相反.

If you simply want to see what a file or folder looked like at an earlier revision, use Update to revision or Save revision as... instead.

恢复本次修订的更改

撤消在其中所做的更改选定的修订版.更改已在您的工作副本中撤消,因此此操作根本不会影响存储库!请注意,这将仅撤消在该修订版中所做的更改;它不会取代您的工作副本以及早期版本的整个文件.这个当其他不相关时撤消先前的更改非常有用此后进行了更改.

Undo changes from which were made in the selected revision. The changes are undone in your working copy so this operation does not affect the repository at all! Note that this will undo the changes made in that revision only; it does not replace your working copy with the entire file at the earlier revision. This is very useful for undoing an earlier change when other unrelated changes have been made since.

如果您的工作副本处于未修改状态,在您执行此操作后您的工作副本将显示为已修改.如果你已经有本地更改,此命令会将撤消更改合并到您的工作副本.

If your working copy is in an unmodified state, after you perform this action your working copy will show as modified. If you already have local changes, this command will merge the undo changes into your working copy.

内部发生的事情是 Subversion 执行反向操作合并那个修订版,从之前的提交中撤消它的影响.

What is happening internally is that Subversion performs a reverse merge of that one revision, undoing its effect from a previous commit.

您可以按照上述还原到此版本中的说明撤消撤消操作.

You can undo the undo as described above in Revert to this revision.

这篇关于用乌龟SVN恢复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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