颠覆之后为空的存储库->汞转化 [英] Empty repository after subversion -> mercurial conversion

查看:70
本文介绍了颠覆之后为空的存储库->汞转化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用'hg convert'命令尝试将我的SVN信息库移至hg,它似乎可以正常工作(花一些时间并打印出所有提交消息),但最后结果是Mercurial目录为空.它具有.hg隐藏子目录,大约200 MB,因此发生了一些事情,但是没有文件.

I've used the 'hg convert' command to try to move my SVN repository to hg, and it seems to work (takes a while and prints out all the commit messages as it goes), but at the end the resulting Mercurial directory is empty. It has the .hg hidden subdirectory in it, and it's about 200 MB so SOMETHING happened, but none of the files are there.

有什么想法吗?

我能想到的唯一涉及到的是,我们没有许多项目,而有顶级项目,目录,标签目录,而我们有许多项目,每个项目都有自己的项目,分支,标签:

The only thing I can think of as being involved is that instead of having top-level trunk, brankes, tags directories, we have many projects, each with their own trunk, branches, tags:


svn-repository/  
    Project1/  
        trunk/  
        branches/  
        tags/  
    Project2/  
        trunk/  
        branches/  
        tags/  

等...

那是造成问题的原因吗?我的理解是SVN并不真正在乎组织存储库的方式,但是Mercurial会吗?

Could that be causing the problem? My understanding is that SVN doesn't really care how you organize the repository, but does Mercurial?

推荐答案

您需要运行hg update以获得工作副本.

You need to run hg update to get a working copy.

(这类没有工作副本的Mercurial存储库可以用作纯通信点,就像修订服务器一样,可以将修订版本推入或拉出.在这种情况下,它是由hg convert创建的,但是您也可以创建此类存储库使用hg clone --noupdatehg update null.省略工作副本文件可以节省一些空间.)

(Such mercurial repositories without a working copy can be used as pure communication points where revisions are pushed to or pulled from, much like a subversion server. In this case it was created by hg convert, but you can also create such repositories with hg clone --noupdate or hg update null. Omitting the working copy files saves some space.)

此外,我建议您分别转换每个项目.如果提供"project1"的URL,则hg convert将自动检测trunkbranchestags子文件夹,并会执行正确的操作.

Also, I would recommend you convert each project separately. If you give the URL for "project1", hg convert will automatically detect the trunk, branches and tags subfolders and will do the right thing.

在分支机构中,分支机构是一流的概念,而不仅仅是从主干通过svn复制的文件夹.分支不会像svn那样位于任何用户可见的位置.在一个单一的资源库中拥有多个项目(每个项目都有自己的分支)并没有什么意义.

In mercurial, branches are first-class concepts rather than just folders who happen to have been svn-copied from the trunk. The branches don't live in any user-visible location like in svn. Having multiple projects (each with their own branches) in a single mercurial repository doesn't really make sense.

这篇关于颠覆之后为空的存储库->汞转化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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