SVN:更改过去的修订版并更改当前的修订版
好的,说我正在修订 4。
我检查它,进行一些更改并提交它。我没有使用修订版 5。
我再次查看,正在进行一些更改,但我被告知修订版 5 中有一个拼写错误,需要立即更改。
我不想在当前的工作副本中修复它,因为我正处于某件事之中,它还没有准备好提交。但我不想回到修订版 5 并失去我所有的工作。
我想做的是回到修订版 5,进行一些小的更改,然后提交。并且还对我当前的工作副本进行了更改。
我希望这是有道理的。有办法做到这一点吗?
ok say I am on revision 4.
I check it out, make some change and commit it. I am not on revision 5.
I check it out again, am making some changes, but I am informed that there was a typo from revision 5 that needs to be changed right away.
I don't want to fix it in my current working copy because I am in the middle of something and it wont be ready to commit yet. But I don't want to revert back to revision 5 and loose all my work.
what I want to do is go back to revision 5, make the small change, commit it. And ALSO have that change made to my current working copy as well.
I hope that makes sense. Is there a way to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
简单的。查看其他地方的源代码,进行一些小的更改,然后执行 svn commit。然后在你的“主”工作副本中执行 svn update 。这不会改变转速。 5(不可能更改 SVN 中提交的任何内容),但会执行您想要的操作。
Easy. Check out the source somewhere else, make your small change, do svn commit. Then do svn update in your "main" working copy. This will not change rev. 5 (it's impossible to change anything commited in SVN), but will do what you want.
您可以通过避免签出并仅将工作副本中要更改的部分复制到不同的目录(在工作副本之外)来节省时间。
检出比复制慢
You can save time by avoiding checking out and just copy the part of your working copy which you want to change into a different directory(outside of your working copy).
checking out is slower than copying