Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 to new repositories with their history intact?

Thanks in advance.

like image 435
Amenti Avatar asked Dec 22 '25 07:12

Amenti


1 Answers

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.

like image 93
Robert Jeppesen Avatar answered Dec 23 '25 23:12

Robert Jeppesen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!