开发者

Mercurial: Create new repository from existing folder in old repository [duplicate]

开发者 https://www.devze.com 2023-02-22 13:10 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Can I split a Mercurial repository?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Can I split a Mercurial repository?

I have a Mercurial repository with multiple projects (when I started with Mercurial that seemed to be a good idea...).

Is it possible to convert the projects/folders t开发者_如何学Pythono new repositories with their history intact?

Thanks in advance.


You should be able to do it with ConvertExtension, converting from Mercurial to Mercurial.

From 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

I've had success with the following command line

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

where fm-txt would look like

include SubProjectFolderName

You might want to look into renaming that folder to not be a sub-folder in the new repo. Haven't tried that myself though.

0

精彩评论

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