使用 Subversion 回滚更改集的最佳方法是什么? [英] What is the best way to roll-back a change set using Subversion?
问题描述
一段时间以来,我一直在使用各种源代码控制系统,但在恢复更改方面,我还不是专家.在这种情况下,有人可以帮忙吗:
I've been using various source control systems for a while, but when it comes to reverting changes I'm not yet an expert. Can someone help given this scenario:
- 鉴于修订版 #5 中引入了一个错误
- 在第 5 版中更改了 3 个文件
- 2 个文件中的更改是导致错误的原因
- 当客户在版本 #9 (HEAD) 的版本中发现错误时
- 然后,必须将修订版 #5 中导致错误的 2 个文件恢复到修订版 #4
- 并且必须将修订版 #6 到 HEAD 的更改应用于这两个文件
我希望必须有一种方法可以比较两个文件的第 4 号和第 5 版,并生成一个补丁来撤销第 5 版中的更改,然后可以将其应用于 HEAD 修订版以回滚缺陷.
I expect there must be a way to compare revisions #4 and #5 of the two files and generate a patch that undoes the changes in revision #5, which can then be applied to the HEAD revision to roll-back the defect.
推荐答案
这里有一个 链接到 svn 解释所有关于恢复和历史的书.
Here is a link to svn book explaining all about reverts and history.
要做一个差异,你会做类似 svn diff -r 4:5 somefile.txt 的事情
To do a diff you would do something like svn diff -r 4:5 somefile.txt
这篇关于使用 Subversion 回滚更改集的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!