导入SVN [英] Import exported SVN

查看:181
本文介绍了导入SVN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个特定的问题。我如何导入导出的SVN repo?
我已经读了很少的这里的导入/导出问题,但我的情况更具体。我所得到的是一个出口的SVN repo(与我的项目的来源),现在我需要重新导入。我如何做?

解决方案

我认为戴夫是正确的,关于这个词 export ,但是他的答案中涉及的命令似乎有些混乱。



如果你有一个目录结构,其中您将看到项目中源文件的文件,并且没有 .svn 子目录,您的结果是 svn导出。 .. 命令,而您没有任何存储库历史记录,您只能拥有该项目的快照。在这种情况下,您可以使用 svnadmin create ... 命令在新服务器上创建一个新的subversion repo,然后使用 svn import ... 。将该快照提交到新的存储库。



如果你有一个文件,其中包含一堆东西,看起来像部分源代码与许多其他东西混合在一起,那么你得到了所谓的转储文件。此转储文件包含您的项目,包括该项目的所有历史记录。在这种情况下,您将使用 svnadmin create ... 创建新的存储库,然后使用 svnadmin load ... 命令。



之后,您将要使用 svn co ... 检查一份您可以开发的工作副本。



如果您获得的是该项目的快照,我建议您回到他们面前尝试获得一个转储文件代替...源代码控制历史是有价值的。


I have a bit specific question. How would I import an exported SVN repo? I have already read few of the import/export questions around here, but my case is more specific. What I got was an exported SVN repo (with my projects' source), now I need to import it again. How would I do it?

解决方案

I think Dave is right about there being confusion around the meaning of the word export, but there seems to be some confusion as to the commands involved in his answer.

If you have a directory structure in which you see the files that look like the source files in your project, and there are no .svn subdirectories, you have the result of an svn export ... command, and you don't have any repository history, you only have a snapshot of the project. In this case, you create a new subversion repo on your new server using the svnadmin create ... command, and then use svn import .... to commit that snapshot into your new repository.

If you got a single file with a bunch of stuff in it that looks like it has parts of the source code mixed in with lots of other stuff, then you got what is called a "dump file". This dump file contains your project, including all history for that project. In this case, you create your new repository with svnadmin create ..., then load the data into a repository using the svnadmin load ... command.

After that, you will want to use svn co ... to checkout a working copy that you can then develop in.

If what you got was a snapshot of the project, I would encourage you to go back to them and try to get a dump file instead... source control history is valuable.

这篇关于导入SVN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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