如何在 Subversion 中删除文件夹的 1 个修订版 [英] How to remove 1 revision of a folder in Subversion

查看:30
本文介绍了如何在 Subversion 中删除文件夹的 1 个修订版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的存储库中有几个项目,每个项目都有自己的文件夹.是否可以在不更改任何其他内容的情况下删除其中一个项目的最新修订版?

I have several projects in my repository, each project has it's own folder. Is it possible to remove the last revision of one of the projects without changing anything else?

示例:项目 A 的最新版本已提交创建版本.50. 其他项目的工作还在继续,存储库现在处于 rev.60.

Example: Project A's latest version was committed creating rev. 50. Work on other projects goes on, the repository is now at rev. 60.

现在 A 的用户回来并要求删除上一个版本的更改,因为它们对他不起作用.他想回到以前的版本,所有进一步的更改都应该从那里开始.

Now the user of A comes back and requests to remove the changes of the last version because they don't work out for him. He wants to go back to the previous version and all further changes should be done starting from there.

在这一点上,我想要 rev.50 消失,以便项目 A 可以继续进行.50 从未发生过.

At this point I would like rev. 50 to disappear so that project A can go on as if rev. 50 never happened.

我能看到的唯一方法是创建一个分支,然后从现在开始在该分支上工作.但这只会随着时间的推移创建许多分支,并且项目的历史变得混乱.

The only way I can see is to create a branch and from now on work on that branch. But that just creates many branches over time and the project's history gets cluttered.

对于这种情况有什么好的解决方案?

What is a good solution for this scenario?

推荐答案

  1. 进行更新以确保您的工作副本是最新的.确保您的工作副本是干净的,没有待修改的内容.
  2. 右键单击根文件夹您项目的工作副本和显示日志"
  3. 选择(使用 ctrl/shift 选择多个)您想要的修订撤消
  4. 右键单击选定的修订并从这些修订"
  5. 检查修改撤消操作已对您进行工作副本.解决任何冲突如有必要.
  6. 提交修改

目前接受的 Gabriel Hurley 的回答没有意义:在执行更新到修订版"后不可能提交.该操作会回滚您的工作副本所基于的 BASE 修订版.当尝试提交更改时,subversion 会抱怨文件和文件夹已过期.

The answer by Gabriel Hurley that you have currently had accepted doesn't make sense: it is not possible to commit after doing an "update to revision". That operation rolls back the BASE revision that your working copy is based on. When trying to commit changes, subversion will then complain that the files and folders are out of date.

您希望还原为修订版还原修订版的更改功能,而不是更新到修订版".

You want the revert to revision or revert changes from revision features, not "update to revision".

这篇关于如何在 Subversion 中删除文件夹的 1 个修订版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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