Clone Subversion to Mercurial Fails with 'unknown exception'
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
An 'Unknown Exception' error message appears when cloning Subversion. An error appears:
1
2
3
4
5
6
7
8
9
10
11
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)]
** Mercurial Distributed SCM (version 1.7+20101101)
** Extensions loaded: rebase, progress, mq, transplant, extdiff, graphlog, hgsubversion
Traceback (most recent call last):
File "/usr/local/bin/hg", line 38, in <module>
mercurial.dispatch.run()
[...]
assert self.svn_url.startswith(self.root)
AssertionError
Cause
This occurs when using an SSH URL with a 'double slash' format to specify a path from the root, like this:
1
svn+ssh://user@server.com//home/svn/myproject
hgsubversion doesn't like the double-slash.
Resolution
To avoid this problem, remove the doubleslash in the root path, like this:
1
svn+ssh://user@server.com/home/svn/myproject
The repository should then clone successfully.
Was this helpful?