Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hg convert from Subversion on macOS -- could not load Subversion python bindings?

I want to convert a subversion repository to mercurial on macOS. I've made a local copy of the svn repo. Then I tried

hg convert --source-type svn --dest-type hg srcPath dstPath

and got

could not load Subversion python bindings
abort: srcPath: missing or unsupported repository

I found this page on the convert extension, which talks about needing Subversion python bindings. One thing it says is

Bindings are included with the TortoiseHg distribution package and the Win32 InnoSetup (non-MSI) binaries for Mercurial, so if you install either of them you don't need to install additional packages.

Well, I installed TortoiseHG, which is an application on macOS, but I don't see how that helps.

It also says

For Mac OS X, the easiest way is to install the CollabNet Subversion build, and then copy the content of /opt/subversion/lib/svn-python to the site-package directory of the Python installation.

So I follow their link to the CollabNet Subversion build, and I see offerings for Windows, Linux, and Solaris, but nothing about macOS.

I also tried installing MacPorts and installing the subversion-python27bindings package. Didn't help. (In case it's not obvious, I'm not familiar with Python and have only the vaguest idea what bindings are.)

I'm lost.

like image 921
JWWalker Avatar asked Apr 15 '26 12:04

JWWalker


1 Answers

I got it to work by using MacPorts to install the hgsubversion extension, and then using that to clone the svn repository, rather than using hg convert.

like image 199
JWWalker Avatar answered Apr 18 '26 00:04

JWWalker