0
votes

I'm trying to convert a Subversion repository to Mercurial.

This is what I've done:

Followed the instructions here, here and here, and:

  • installed TortoiseHg 2.9.2 (with Mercurial 2.7.2)

  • installed Python 2.7 (not Python 2.6 like the link says)

  • used paths instead of collections as specified here to denote the repositories:

  • set up a web server to host repository (ensuring that the CgiModule was installed via Server Manager)

Set up a Mercurial repository in C:\MyRepository

Ensured that in C:\MyRepository\.hg\hgrc file, I added

[extensions]
convert =

Typed in C:\MyRepository>hg convert http://www.myrepository.org:8080/svn --debug --traceback

I got this output:

assuming destination svn-hg
initializing destination svn-hg repository
svn: cannot probe remote repository, assume it could be a subversion repository. Use --source-type if you know better
Traceback (most recent call last):
  File "hgext\convert\subversion.pyo", line 264, in __init__
  File "hgext\convert\transport.pyo", line 89, in __init__
  File "libsvn\client.pyo", line 1845, in svn_client_open_ra_session
SubversionException: ("Repository moved permanently to 'http://myrepository.org:8080/'; please relocate",
5011)
using http://myrepository.org:8080/svn
sending capabilities command
real URL is http://myrepository.org:8080/
requested URL: 'http://myrepository.org:8080/svn?cmd=capabilities'
sending between command
sending capabilities command
requested URL: 'http://myrepository.org:8080/?cmd=capabilities'
capabilities: none
requested URL: 'http://myrepository.org:8080/?cmd=between&pairs=0000000000000000000000000000000000000000-
0000000000000000000000000000000000000'
http authorization required
realm: VisualSVN Server
user: tolao
password:
http auth: user tolao, password *********
Traceback (most recent call last):
  File "mercurial\dispatch.pyo", line 97, in _runcatch
  File "mercurial\dispatch.pyo", line 778, in _dispatch
  File "mercurial\dispatch.pyo", line 549, in runcommand
  File "mercurial\dispatch.pyo", line 869, in _runcommand
  File "mercurial\dispatch.pyo", line 840, in checkargs
  File "mercurial\dispatch.pyo", line 775, in <lambda>
  File "mercurial\util.pyo", line 507, in check
  File "hgext\convert\__init__.pyo", line 283, in convert
  File "hgext\convert\convcmd.pyo", line 497, in convert
  File "hgext\convert\convcmd.pyo", line 56, in convertsource
  File "hgext\convert\hg.pyo", line 241, in __init__
  File "mercurial\hg.pyo", line 112, in repository
  File "mercurial\hg.pyo", line 102, in _peerorrepo
  File "mercurial\httppeer.pyo", line 245, in instance
  File "mercurial\statichttprepo.pyo", line 159, in instance
  File "mercurial\statichttprepo.pyo", line 106, in __init__
  File "mercurial\scmutil.pyo", line 823, in readrequires
  File "mercurial\scmutil.pyo", line 223, in read
  File "mercurial\statichttprepo.pyo", line 42, in read
IOError: [Errno None] HTTP Error 500: Internal Server Error
abort: HTTP Error 500: Internal Server Error

Any idea why I got the '500 internal server error' at the end?

2

2 Answers

1
votes

The mercurial convert extension you're using says you should use svnsync to sync the full svn history local and to convert from that. Converting from a local source would avoid this (since that 500 comes from your remote server which would be out of the picture) and saves a lot of overall time.

0
votes

It seems that the URL you enter is incorrect. Double-check whether you enter correct URL to Subversion repository. It should be http://www.myrepository.org/svn/<repo-name>.