TAGS :Viewed: 11 - Published at: a few seconds ago

This is a but of a part 2 in trying to convert an SVN repository to a Mercurial one

command is:

hg convert file://c:/svnrepository

but, the output I get is:

assuming destination svnrepository-hg
initializing destination svnrepository-hg repository
file://c:/svnrepository does not look like a CVS checkout
file://c:/svnrepository does not look like a Git repo
Subversion python bindings could not be loaded
file://c:/svnrepository is not a local Mercurial repo
file://c:/svnrepository does not look like a darcs repo
file://c:/svnrepository does not look like a monotone repo
file://c:/svnrepository does not look like a GNU Arch repo
file://c:/svnrepository does not look like a Bazaar repo
file://c:/svnrepository does not look like a P4 repo
abort: file://c:/svnrepository: missing or unsupported repository

The line I'm interested in is:

Subversion python bindings could not be loaded

I have installed python 2.5, and I have installed the python subversion bindings from the subversion website. But still getting this error

Answer 1


I just wanted to bring the actual solution out of the comments to Alex Martelli's answer:

According to: selenic.com/pipermail/mercurial/2009-May/… the subversion bindings are included in tortoisehg. So you just need to enable the convert extension in tortoisehg. – tonfa

Ah ha! Another step forward. I changed my path to point at hg in TortoiseHG instead of Mercurial and this got over that hurdle. Now it just doesn't think the repository is an SVN one, ahh! – Paul

This worked for me as well.

If you're currently using the standard command line version of HG on Windows, the specific steps are:

  • Install TortoiseHG
  • Right click a file / TortoiseHG / Global Settings... / Extensions / {Check "convert"}
  • Make sure TortoiseHG is the path for your hg command:
    • WinKey+Pause / Advanced / Environment Variables / System Variables / Path
    • REMOVE C:\Program Files\Mercurial from the path
    • Make sure C:\Program Files\TortoiseHG is there

Answer 2


The problem's explained here at heading "Converting from Subversion":

Subversion's Python bindings are a prerequisite. The bindings (generated with SWIG) are installed separately on Windows, and can be found on http://subversion.tigris.org/ . Note that you can't do this with the Win32 Mercurial binaries -- there's no way to install the Subversion bindings into its built-in Python library. So you'll need to use a Mercurial installed on top of a stand-alone Python, and you may also need to do something like "set HG=python c:\Python25\Scripts\hg" to override the default Win32 binaries if you have those installed also. 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.

Unfortunately hg + svn + win doesn't apparently get any easier with hgsubversion, at least judging from this post and this discussion thereof (I have no Windows installed to try and help out, sigh).

Answer 3


sudo apt-get install python-subversion

did the trik for me on ubuntu..