1

I have a mercurial repository hosted on bitbucket containing several folders. My goal was to split each of these folder into a separate repository. After trying a few things suggested on stackoverflow, which failed, my last throw of the dice was to replicate a mock example in the bitbucket tutorial

Even though I followed the instructions to the letter, this also failed:

hg convert -s hg -d hg --filemap mymapfile hgsplitpractice hgfreshrepo
initializing destination hgfreshrepo repository
hgsplitpractice is not a local Mercurial repository
abort: hgsplitpractice: missing or unsupported repository

This is the same error that appeared in my previous attempts to split my actual repo.

The questions are: 1. why is this failing? 2. is there any other way to split these repositories?

fridaymeetssunday
  • 1,118
  • 1
  • 21
  • 31

2 Answers2

0

You can try to use the convert extension.

After the command:

--filemap

you can use:

exclude path/that/you/want/to/split
rename path/that/you/want/to/split .

See this thread for more: Can I split a Mercurial repository?

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Elias
  • 1,367
  • 11
  • 25
  • I did see that thread and I believe it was my starting point. There is already a file mymapfile containing the line "include bigdir" in my main repo folder. After including the lines "exclude lildir exclude lildir2" it still gives the same error. – fridaymeetssunday May 09 '14 at 20:44
0

I was getting the same error as you did.
In my case, the problem was something really silly: I was referring to both repositories by their names instead of specifying their full path.
I hope it helps someone else.

This was failing:

hg convert -s hg -d hg --filemap mymapfile "My-old-repo" "New-repo"

This worked like a charm:

hg convert -s hg -d hg --filemap mymapfile "d:/allrepos/My-old-repo" "d:/allrepos/New-repo"
zed
  • 2,298
  • 4
  • 27
  • 44