回滚或恢复整个 svn 存储库到旧版本

编程入门 行业动态 更新时间:2024-10-25 06:21:44
本文介绍了回滚或恢复整个 svn 存储库到旧版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我搞砸了我的 SVN 存储库,现在需要将整个存储库从修订版 28 恢复到 24,并且不想处理差异或冲突.有没有一种快速而简单的方法来做到这一点?我已经能够在使用合并命令之前恢复单个文件 - 但在这种情况下,它希望将所有文件从修订版 28 添加回存储库,而我真正想做的只是删除它们.

I messed up on my SVN repository and now need to revert the entire repository from revision 28 to 24 and don't want to deal with diffs or conflicts. Is there a quick and simple way to do this? I've been able to revert back single files before fine with the merge command - but in this instance it wants to add all of the files back into the repository from revision 28 when all I really want to do is delete them.

我在 Linux 机器 (bash) 上使用命令行.

I am using the command line on a linux box (bash).

谢谢

编辑

感谢大家的帮助!我通过以下方式修复它:

Thanks for all of the help! I fixed it by:

svnadmin create /svnroot/<repo>.fixed svnadmin dump -r 1:24 /svnroot/<repo> --incremental > dump.svn svnadmin load /svnroot/<repo>.fixed < dump.svn

然后将旧的 repo 放在备份位置并将 repo.fixed 移动到 repo.

Then putting the old repo in a backup location and moving the repo.fixed to repo.

再次感谢!

推荐答案

查看 svnadmin dump/load.它会为您的文件的每个版本创建一个文本文件.可以删除某个点上方/下方的所有内容并重新导入.

Check out svnadmin dump/load. It creates a text file with every version of your files. It may be possible to delete everything above/below a certain point and re-import it.

例如参见迁移其他地方的存储库数据

更多推荐

回滚或恢复整个 svn 存储库到旧版本

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

发布评论

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

>www.elefans.com

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