When I started with Mercurial about a year ago I created one repository called SandBox to put all my projects in it, now about a year later I realize that wasn’t very smart choice I have 19 project in it some of them are big. I would like to give each project its own repository also keeping the history. Is there an easy way I accomplish this?
Share
Well, consider a project with the following structure (in bitbucket):
This project has this log:
You can extract the projects using the Convert extension with the –filemap option.
How to do it? First, you should create a filemap file. In this case, the content should be:
The first line will move everything inside the
proj1dir to the root of the new repository. The second line will remove theproj2dir from the new repository, and the third line will remove theproj3.To use it, just call this way:
Now, enter the new repo:
It has no working copy…
y but you just need to update:
And the new log is…
You should follow these steps for each project of your repository.