Mercurial:从旧存储库中的现有文件夹创建新存储库

时间:2011-04-05 21:20:23

标签: mercurial repository dvcs

  

可能重复:
  Can I split a Mercurial repository?

我有一个包含多个项目的Mercurial存储库(当我开始使用Mercurial时,这似乎是个好主意......)。

是否可以将项目/文件夹转换为其历史记录完整的新存储库?

提前致谢。

1 个答案:

答案 0 :(得分:5)

你应该可以使用ConvertExtension,从Mercurial转换为Mercurial。

来自docs:

The filemap is a file that allows filtering and remapping of files and
directories. Each line can contain one of the following directives:

  include path/to/file-or-dir

  exclude path/to/file-or-dir

  rename path/to/source path/to/destination

我使用以下命令行取得了成功

hg convert ./OriginalRepo ./NewRepo --filemap fm.txt

其中fm-txt看起来像

include SubProjectFolderName

您可能希望将该文件夹重命名为不是新仓库中的子文件夹。我自己没试过。

相关问题