如何将单个hg存储库转换为多个存储库

sha*_*noo 5 mercurial mercurial-convert

我有一个包含5个子目录的存储库.

回购/

a/
    file-a
b/
    file-b
c/
    file-c
d/
    file-d
e/
    file-e
Run Code Online (Sandbox Code Playgroud)

如何将每个子目录转换为不同的存储库?(只应将给定子目录的相关变更集转换为新的存储库)

Dav*_*ver 6

使用转换扩展名--filemap标志(在确保convert您的扩展程序已启用后~/.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
Run Code Online (Sandbox Code Playgroud)