开发者

Empty repository after subversion -> mercurial conversion

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.

Any thoughts?

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/  

etc...

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


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

(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.)

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.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜