Migrate from CVS to Mercurial: Separating projects

后端 未结 2 620
陌清茗
陌清茗 2021-01-06 23:53

We have a CVS repository with years of development history and 3 projects under one project (CVS folder). Those should be different repositories in a Mercurial repo. They ar

2条回答
  •  一整个雨季
    2021-01-07 00:35

    The best way to do this is to convert the entire repository from CVS to mercurial and then use the hg convert command with a --filemap to convert that single mercurial repo into multiple mercurial repos (convert will convert from hg to hg). Your filemap will say something like:

    include SubProject1
    rename SubProject1 .
    

    That will throw away everything that's not in sub project one and then move subproject one to the top (notice that trailing dot).

    If you run that with a filemap for each of your sub projects, each time with the full repo as input, you'll end up with exactly what you want.

    Some people have built shell scripts to do this, but if it's really just 3 of them it should be pretty quick.

提交回复
热议问题