There is not an easy way to do this. It doesn’t seem to be documented well with Mercurial on the Convert extension page, but it seems to be the case that
hg convert --branchmap will allow you selectively convert SVN branches.
Set up your
branchmap.txt as follows:
Unwanted_Branch1 ### THERE IS A SPACE AFTER 'Unwanted_Branch1' Unwanted_Branch2 ### THERE IS A SPACE AFTER 'Unwanted_Branch2'
Note: Make sure to put a space after the name of the branch, or it will complain about not getting a key/value pair. Also, make sure there is no newline at the end of the file, or it will also complain.
Then run your convert as you have been, adding
You can also rename branches, if you want, using the branchmap:
Old_Branch1 New_Branch1 Old_Branch2 New_Branch2 Unwanted_Branch1 ### THERE IS A SPACE AFTER 'Unwanted_Branch1' Unwanted_Branch2 ### THERE IS A SPACE AFTER 'Unwanted_Branch2'
Any branches you don’t specify in the branchmap will be imported with their current name.