恢复到文件的先前 SVN 修订版的更好方法?

编程入门 行业动态 更新时间:2024-10-15 16:23:28
本文介绍了恢复到文件的先前 SVN 修订版的更好方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我不小心向 SVN 存储库提交了太多文件,并更改了一些我无意的内容.(叹气.)为了让它们恢复到以前的状态,我能想到的最好的方法是

I accidentally committed too many files to an SVN repository and changed some things I didn't mean to. (Sigh.) In order to revert them to their prior state, the best I could come up with was

svn rm l3toks.dtx svn copy -r 854 svn+ssh://<repository URL>/l3toks.dtx ./l3toks.dtx

天啊!没有更好的办法吗?为什么我不能写这样的东西:

Jeez! Is there no better way? Why can't I just write something like this:

svn revert -r 854 l3toks.dtx

好的,我只使用 v1.4.4,但我浏览了 1.5 分支的更改列表,我看不到任何与此直接相关的内容.我错过了什么吗?

Okay, I'm only using v1.4.4, but I skimmed over the changes list for the 1.5 branch and I couldn't see anything directly related to this. Did I miss anything?

我想我还不够清楚.我不认为我想要反向合并,因为那样我会丢失我确实想要进行的更改!假设 fileA 和 fileB 都被修改了,但我只想提交 fileA;不小心打字

I guess I wasn't clear enough. I don't think I want to reverse merge, because then I'll lose the changes that I did want to make! Say that fileA and fileB were both modified but I only wanted to commit fileA; accidentally typing

svn commit -m "small change"

提交两个文件,现在我想回滚fileB.反向合并使这项任务并不比我上面概述的步骤更容易(据我所知).

commits both files, and now I want to roll back fileB. Reverse merging makes this task no easier (as far as I can tell) than the steps I outlined above.

推荐答案

svn merge -r 854:853 l3toks.dtx

svn merge -c -854 l3toks.dtx

这两个命令是等价的.

更多推荐

恢复到文件的先前 SVN 修订版的更好方法?

本文发布于:2023-11-06 20:37:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1564613.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:修订版   先前   文件   方法   SVN

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!