乌龟 SVN:恢复
我刚刚在服务器中从 511 恢复到 510;然而,即使服务器显然正在使用 510,但 511 仍然存在,并且 Tortoise SVN 正在将 511 视为头版本,因此认为没有什么可提交的。我能做些什么?
I just reverted in the server from 511 to 510; however, even though the server is clearly working with 510, the 511 is still somewhere and Tortoise SVN is considering 511 as the head version, thus thinking there is nothing to commit. What can I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我对你的问题的理解是,你想要根除版本 511 并回滚到 510。不过,正如其他人所暗示的那样,Subversion 永远不会忘记——没有办法删除修订版本。但你可以很容易地达到同样的效果,我认为一张简单的图片可以清楚地说明它。
以下是修订版图表示例,其中以修订版 105 作为开头。这里的目标是不仅丢弃 105,还丢弃 104(表明您可以将此技术应用于不仅仅是倒数第二个头),使 103 成为新头:
现在,您可以通过将其复制为 106,有效地回滚到 103。(或者从不同的角度来看,您可以说 103 转世为 106 :-)。
My reading of your question is that you want to eradicate version 511 and rollback to 510. As intimated by others, though, Subversion never forgets--there is no way to erase a revision. But you can achieve the same effect quite easily and I think a simple picture can illustrate it cleanly.
Here is a sample revision graph where you start with revision 105 as the head. The goal here is to discard not just 105 but also 104 (showing you can apply this technique to more than just the penultimate head), making 103 the new head:
You now have effectively rolled back to 103 by duplicating it as 106. (Or from a different perspective, you could say 103 was reincarnated as 106 :-).
svn help revert
)来反映,并丢弃您的本地更改并生成“原始 WC”对存储库不执行任何操作重新思考并重新制定您的任务和麻烦。您想要“撤消上次提交的修订”吗?
svn help revert
) discard your local changes and produce "pristine WC" and do nothing with repoRe-think and reformulate your task and troubles. Do you want "undo last commited revision"?
如果 SVN 存储库已恢复,或者换句话说,设置了多个修订版本 - 所有已更新为当前不存在修订版本的工作副本应与新工作副本合并(因为默认情况下标准客户端不提供提交日志记录) ,也许有人将此作为扩展)。
因此,创建新的 WC(在您的情况下,此版本的修订版将为 510),并将 GUI 合并更改之一(或仅复制文件)从当前 WC 合并到新的 WC 中,并将更改提交到新的 WC 中(所有这些都与您所做的一样)当提交版本 511 时),然后切换到使用新的 WC 并放弃旧的。
If SVN repository was reverted, or in another words was set a several revisions back - all working copies which has been updated to currently non existing revisions should be merged with new working copy (as there are no commit logging is provided by standard clients by default, maybe someone has this as an extension).
So, create new WC (in your case revision of this will be 510), and merge with one of GUI mergers changes (or just copy files) from your current WC into new one and commit the changes into new WC (all as you did when committed rev. 511), then switch to working with new WC and drop old one.
更新到特定版本很少是您想要做的事情。您想要做的是在日志对话框中选择一组修订,然后恢复这些修订(在您的情况下为修订 511)。为此使用干净的工作副本以避免混淆。 Tortoise SVN 现在将更改反向合并到您的工作副本中。到目前为止,服务器上的数据仍然未受影响。现在您必须将这些更改提交到服务器上。它将显示为新版本(在本例中为 512)。好的做法是不要更改任何文件并选择适当的日志消息,例如“从版本 511 恢复更改”。
Subversion(据我所知没有任何版本控制系统)不允许删除修订版本,所以这是要走的路。
Updating to a specific revision is seldomly what you want to do. What you want to do instead is selecting a set of revisions in the log dialog, and revert these revisions (in your case revision 511). Use a clean working copy for this to avoid confusion. Tortoise SVN now reverse-merges the changes into your working copy. Up to this point the data on the server is still untouched. Now you have to commit these changes onto the server. It will appear as a new revision (512 in this case). Good practice is not to change any files and choose a proper log-message like "reverted changes from rev 511".
Subversion (and no versioning system I know of) doesn't allow deletion of revisions, so this is the way to go.
你想让我做什么?
恢复是撤消本地更改(在工作副本中):
http://svnbook.red-bean.com/en/1.1/re25.html
如果您想撤消已提交到存储库的更改,则必须执行反向合并。在您的具体情况下,您必须执行以下操作:
svn merge -c-511
您可以在“撤消更改”部分阅读更多内容
http://svnbook.red-bean.com/en/1.5 /svn.branchmerge.basicmerging.html
What do you want to do?
A revert is undoing local changes (in a working copy):
http://svnbook.red-bean.com/en/1.1/re25.html
If you want to undo changes already commited to the repository you must do a reverse merge. In your particular case you must do:
svn merge -c-511
You can read more un the "Undoing Changes" section of
http://svnbook.red-bean.com/en/1.5/svn.branchmerge.basicmerging.html