回滚或恢复整个 svn 存储库到旧版本 [英] Roll back or revert entire svn repository to an older revision

查看:26
本文介绍了回滚或恢复整个 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 存储库到旧版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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