开发者

How to convert single hg repository to multiple repositories

开发者 https://www.devze.com 2023-02-13 21:48 出处:网络
I have a repository with 5 sub-dire开发者_开发百科ctories. repo/ a/ file-a b/ file-b c/ file-c d/ file-d

I have a repository with 5 sub-dire开发者_开发百科ctories.

repo/

a/
    file-a
b/
    file-b
c/
    file-c
d/
    file-d
e/
    file-e

How can I convert each sub-directory in to different repositories? (Only relevant changesets to the given sub-directory should be converted new repositories)


Use the convert extension and the --filemap flag (after making sure that the convert extension is enabled in your ~/.hgrc):

$ hg init new-a
$ cat > a-map
rename a .
exclude b
exclude c
...
$ hg convert --filemap a-map old-repo new-a
$ cd new-a
$ hg co tip
0

精彩评论

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