Issue1783

Title SVN convert on Linux not working
Priority bug Status chatting
Superseder Nosy List Grauw, dov
Assigned To Topics

Created on 2009-08-06.18:27:05 by Grauw, last changed 2010-04-22.12:43:54 by dov.

Messages
msg12346 (view) Author: dov Date: 2010-04-22.12:43:54
See http://bitbucket.org/durin42/hgsubversion/issue/97/ for a workaround
which may help here, too...
msg10293 (view) Author: Grauw Date: 2009-08-07.21:39:10
More clues:

Output with --traceback shows that there is a SubversionException about a
failed server certificate verification. Both this university SVN repository
and my work repository have a self-signed or invalid certificate, so I
suspect this might be the root cause.

[grauw@vps529 hg-stable]$ hg --debug --traceback convert
https://svn.cs.uu.nl:12443/repos/grauw-rep/
assuming destination grauw-rep-hg
initializing destination grauw-rep-hg repository
Enter username for Subversion repositories at svn.cs.uu.nl:12443: lholst
Enter password for lholst in Subversion repositories at svn.cs.uu.nl:12443:
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/hgext/convert/subversion.py", line
221, in __init__
    self.transport = transport.SvnRaTransport(url=self.url)
  File "/usr/lib/python2.4/site-packages/hgext/convert/transport.py", line
89, in __init__
    self.client, self.pool)
  File "/usr/lib/python2.4/site-packages/libsvn/client.py", line 1876, in
svn_client_open_ra_session
    return apply(_client.svn_client_open_ra_session, args)
SubversionException: ("OPTIONS of
'https://svn.cs.uu.nl:12443/repos/grauw-rep': Server certificate
verification failed: issuer is not trusted (https://svn.cs.uu.nl:12443)",
175002)
using https://svn.cs.uu.nl:12443/repos/grauw-rep/
sending between command
http authorization required
realm: Subversion repositories
user: lholst
password:
http auth: user lholst, password *********
requested URL:
'https://svn.cs.uu.nl:12443/repos/grauw-rep/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between'
(falling back to static-http)
http authorization required
realm: Subversion repositories
user: lholst
password:
http auth: user lholst, password *********
http authorization required
realm: Subversion repositories
user: lholst
password:
http auth: user lholst, password *********
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/hgext/convert/hg.py", line 216, in
__init__
    self.repo = hg.repository(self.ui, path)
  File "/usr/lib/python2.4/site-packages/mercurial/hg.py", line 63, in
repository
    repo = _lookup(path).instance(ui, path, create)
  File "/usr/lib/python2.4/site-packages/mercurial/httprepo.py", line 258,
in instance
    return statichttprepo.instance(ui, "static-" + path, create)
  File "/usr/lib/python2.4/site-packages/mercurial/statichttprepo.py", line
134, in instance
    return statichttprepository(ui, path[7:])
  File "/usr/lib/python2.4/site-packages/mercurial/statichttprepo.py", line
99, in __init__
    raise error.RepoError(msg)
RepoError: 'https://svn.cs.uu.nl:12443/repos/grauw-rep/' does not appear to
be an hg repository
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a CVS checkout
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a Git repo
https://svn.cs.uu.nl:12443/repos/grauw-rep does not look like a Subversion repo
https://svn.cs.uu.nl:12443/repos/grauw-rep/ is not a local Mercurial repo
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a darcs repo
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a monotone repo
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a GNU Arch repo
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a Bazaar repo
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a P4 repo
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 43, in
_runcatch
    return _dispatch(ui, args)
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 449,
in _dispatch
    return runcommand(lui, repo, cmd, fullargs, ui, options, d)
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 317,
in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 501,
in _runcommand
    return checkargs()
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 454,
in checkargs
    return cmdfunc()
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 448,
in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/python2.4/site-packages/mercurial/util.py", line 402, in check
    return func(*args, **kwargs)
  File "/usr/lib/python2.4/site-packages/hgext/convert/__init__.py", line
232, in convert
    return convcmd.convert(ui, src, dest, revmapfile, **opts)
  File "/usr/lib/python2.4/site-packages/hgext/convert/convcmd.py", line
369, in convert
    opts.get('rev'))
  File "/usr/lib/python2.4/site-packages/hgext/convert/convcmd.py", line 60,
in convertsource
    raise util.Abort(_('%s: missing or unsupported repository') % path)
Abort: https://svn.cs.uu.nl:12443/repos/grauw-rep/: missing or unsupported
repository
abort: https://svn.cs.uu.nl:12443/repos/grauw-rep/: missing or unsupported
repository
msg10292 (view) Author: Grauw Date: 2009-08-07.21:19:23
Looks like any SVN repository requiring authentication has this problem.

E.g. my non-public work SVN repository (that is on the default port, over
https) has the same problem. However e.g. the public
https://mstreeview.svn.sourceforge.net/svnroot/mstreeview converts without a
hitch.

Both https://svn.cs.uu.nl:12443/repos/grauw-rep/ and my work SVN repository
use HTTP Basic authentication.
msg10286 (view) Author: Grauw Date: 2009-08-06.18:27:05
When I try to convert an SVN repository, it first prompts me for
authentication credentials, and then asks me again 4 times before failing:

[grauw@vps529 repos]$ hg convert https://svn.cs.uu.nl:12443/repos/grauw-rep/
assuming destination grauw-rep-hg
initializing destination grauw-rep-hg repository
Enter username for Subversion repositories at svn.cs.uu.nl:12443: lholst
Enter password for lholst in Subversion repositories at svn.cs.uu.nl:12443:
http authorization required
realm: Subversion repositories
user:
password:
http authorization required
realm: Subversion repositories
user: lholst
password:
http authorization required
realm: Subversion repositories
user:
password:
http authorization required
realm: Subversion repositories
user:
password:
abort: HTTP Error 401: Authorization Required

When I add --debug to the command, I get the following response:

[grauw@vps529 repos]$ hg --debug convert
https://svn.cs.uu.nl:12443/repos/grauw-rep/
assuming destination grauw-rep-hg
initializing destination grauw-rep-hg repository
Enter username for Subversion repositories at svn.cs.uu.nl:12443: lholst
Enter password for lholst in Subversion repositories at svn.cs.uu.nl:12443:
using https://svn.cs.uu.nl:12443/repos/grauw-rep/
sending between command
http authorization required
realm: Subversion repositories
user: lholst
password:
http auth: user lholst, password *********
requested URL:
'https://svn.cs.uu.nl:12443/repos/grauw-rep/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between'
(falling back to static-http)
http authorization required
realm: Subversion repositories
user: lholst
password:
http auth: user lholst, password *********
http authorization required
realm: Subversion repositories
user: lholst
password:
http auth: user lholst, password *********
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a CVS checkout
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a Git repo
https://svn.cs.uu.nl:12443/repos/grauw-rep does not look like a Subversion repo
https://svn.cs.uu.nl:12443/repos/grauw-rep/ is not a local Mercurial repo
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a darcs repo
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a monotone repo
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a GNU Arch repo
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a Bazaar repo
https://svn.cs.uu.nl:12443/repos/grauw-rep/ does not look like a P4 repo
abort: https://svn.cs.uu.nl:12443/repos/grauw-rep/: missing or unsupported
repository

I’ve converted other SVN repositories with previous versions of Mercurial
before without a hitch.

In the end, I was able to convert the repository by running a local SVN
server, mirroring the above mentioned SVN repository, and then hg convert
from the local repository. Not exactly ideal though :).

As I can both svn checkout and svnsync, I’d say there is nothing wrong with
the server configuration.

If you need login credentials please drop me a note (or ask me on IRC, I’ll
be there for a while) and I will send them to you, my email address can be
found here: http://www.grauw.nl/about.php

~Laurens
History
Date User Action Args
2010-04-22 12:43:54dovsetnosy: + dov
messages: + msg12346
2009-08-07 21:39:11Grauwsetmessages: + msg10293
2009-08-07 21:19:23Grauwsetstatus: unread -> chatting
messages: + msg10292
2009-08-06 18:27:05Grauwcreate