fridaymeetssunday
fridaymeetssunday

Reputation: 1148

Error when splitting a mercurial repository

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?

Upvotes: 1

Views: 201

Answers (2)

Elias
Elias

Reputation: 1427

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?

Upvotes: 0

zed
zed

Reputation: 2338

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"

Upvotes: 0

Related Questions