服务器停运后移动SVN存储库 [英] Move an SVN respository when the server is dead

查看:66
本文介绍了服务器停运后移动SVN存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的SVN服务器已死.

My SVN server is dead.

我有一台可以用作SVN服务器的计算机,还有几台具有原始存储库工作副本的计算机.

I have another machine I could use as an SVN server and a couple of machines with working copies of the original repository.

是否有一种干净的方法可以仅从当前工作副本在新服务器上重新创建存储库? (历史可以忘记)

Is there a clean way to recreate the repository on a new server, from only a current working copy? (history can be forgotten)

我尝试创建一个新的存储库,入侵其UUID并检查完整的目录结构,然后切换-relocate'ing工作副本,但是由于校验和和修订版号不匹配,因此无法正常工作.

I have attempted creating a new repository, hacking its UUID and checking in the complete directory structure, then switch -relocate'ing the working copies, but this doesn't work due to checksums and revision numbers not matching.

任何帮助将不胜感激!

推荐答案

您没有备份吗?

如果是这种情况,那么最简单的方法是创建一个新的存储库,将一个工作目录的内容导入其中,然后让其他所有人从新的存储库中清除所有内容.试图破解现有的工作目录将比其值得的麻烦更多.

If that's the case, then the simplest approach will be to create a new repository, import the contents of one working directory into it, and then have everyone else check out clean from the new repository. Trying to hack the existing working directories will be more trouble than it's worth.

您将要确保主"工作目录是干净的:在其上执行svn revert,然后删除所有.svn目录-请注意,树的每个级别都有一个目录(一定是执行此操作之前,请先复制一份).

You'll want to make sure that the "master" working directory is clean: do an svn revert on it, then remove all .svn directories -- note that there's one at every level of the tree (definitely make a copy before doing this this).

如果要保留其他工作目录中的更改,则可以从其中删除.svn目录,并使用cpio之类的工具将文件复制到新的工作目录中.

If you want to preserve changes in other working directories, then you can remove the .svn directories from them and use a tool like cpio to copy the files into the new working directories.

这篇关于服务器停运后移动SVN存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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