使用 Tortoise SVN 进行恢复

发布于 2024-12-09 10:02:30 字数 320 浏览 1 评论 0原文

如果我在 TortoiseSVN 中查看 Subversion 日志

在此处输入图像描述

当我选择修订版本并右键单击时,我会看到以下内容选项(除其他外):

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

有人可以解释一下这 3 个版本之间有什么区别吗?

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

If I view the Subversion log in TortoiseSVN

enter image description here

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

  • Update item to revision
  • Revert to this revision
  • Revert changes from this revision

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月依秋水 2024-12-16 10:02:30

您应该选择第二个选项。

单击此对话框中的“帮助”按钮后,您将看到以下内容:

将项目更新为修订版

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

如果您想永久撤消之前的更改,请使用“恢复至此”
而是进行修订。

恢复到此版本

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

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

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

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

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

恢复此版本的更改

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

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

内部发生的事情是 Subversion 执行相反的操作
合并该修订版,撤消其对先前提交的影响。

您可以按照上面恢复到此版本中的描述来撤消撤消操作。

You should choose the second option.

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

Update item to revision

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.

Revert to this revision

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.

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.

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.

Revert changes from this revision

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.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文