当你忘记创建一个新分支时,如何继续在 Subversion 中处理旧版本
我已在 http://www 上设置了一个帐户.projectlocker.com/ 我的一个项目。 我是唯一从事此工作的人,但我认为版本跟踪仍然有用,并且这是一次很好的学习体验。 我已经使用 /trunk/、/branches/、/tags/ 设置了标准文件夹结构。
假设您正在主干上工作,并意识到您确实搞砸了一些东西,但您想返回一些修改并从那里继续。 我可以更新到以前的版本并开始进行更改,但服务器不允许我提交,除非我从上一个版本进行更新,这也会带来所有不需要的更改。 那么我该如何返回到之前的版本,然后继续从那里开始处理主干呢? 我是否以某种方式将旧版本合并到最新版本中?
我正在使用 Visual Studio 的 AnkhSVN 插件,所以我很感激并回答解释如何在该客户端中执行此操作,但我确信我可以从更概念性的答案中找出实际的按钮点击。
duplicate: How do I roll back all or part of a commit to svn?
I've set up an account at http://www.projectlocker.com/ for one of my projects. I'm the only person working on it but I figured having version tracking would still be useful, and it's a good learning experience. I've setup the standard folder structural with /trunk/, /branches/, /tags/.
So say you are working on the trunk and realize that you really messed some stuff up but you want to go back a few revisions and continue from there. I can update to a previous revision and start to make changes, but the server will not allow me to commit unless I update from the last revision which will also bring in all the unwanted changes. So how do I both go back to a previous revision and then continue working on the trunk from there? Do I somehow merge an old revision into the latest revision?
I'm using the AnkhSVN plugin for visual studio so I'd appreciate and answer that explains how to do it in that client, but I'm sure I can figure out the actual button clicks from a more conceptual answer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不使用 AnkhSVN,所以我现在不知道您需要什么点击,但是在 TortoiseSVN 和命令行中这是一项相当好的任务:
您只需通过应用 反向合并 来撤消所有更改。
通常,这是在 Tortoise 中通过以下方式完成的:
在命令行上,您应该执行以下操作:
这将撤消 101-120 的所有修订版,留下与修订版 100 相同的版本
I do not use AnkhSVN, so I do not now exactly what clicks you need, however it is a fairly task in TortoiseSVN and in commandline:
You just has to undo all changes by applying a reverse merge .
usually this is done in Tortoise by :
On Commandline you should do this:
This will undo all revision from 101-120 leaving you with the same as Rev 100
来自颠覆书籍:
http:// /svnbook.red-bean.com/en/1.4/svn-book.html#svn.branchmerge.commonuses.undo
本质上就像你说的......你想将旧版本与你的工作目录合并。
From the subversion book:
http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.branchmerge.commonuses.undo
It's essentially like you said... you want to merge the older version with your working directory.
不确定它是否回答了您的问题,但您可以根据旧版本创建一个分支。
使用 AnkhSVN,最简单的方法是:
(^) 如果 url 不是您所期望的,您应该在文件 -> 中修复解决方案绑定 url 颠覆-> 更改源代码控制。 通常它应该是项目的逻辑根。
Not sure if it answers your question but you can just create a branch based on that old revision.
With AnkhSVN the easiest way to do that is:
(^) If the url is not what you expected you should fix the solution binding url in File -> Subversion -> Change Source Control. Normally it should be the logical root of the project.