3

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.

Community
  • 1
  • 1
Amenti
  • 1,511
  • 1
  • 13
  • 29
  • I'm not sure what you're asking... Are you trying to split one existing Mercurial repository into many new repositories or are you trying to merge multiple existing repositories into one new repository? – Jim Bolla Apr 05 '11 at 21:26

1 Answers1

5

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.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Robert Jeppesen
  • 7,837
  • 3
  • 35
  • 50