Unhandled error from old svn server

Create issue
Issue #17 resolved
Shun-ichi Goto created an issue

When I access to TracHacks server to clone one sub-project, I got exception.

url = http://trac-hacks.org/svn/tagsplugin

exception: {{{ Traceback (most recent call last): File "hg", line 20, in <module> File "mercurial\dispatch.pyc", line 26, in run File "mercurial\dispatch.pyc", line 35, in dispatch File "mercurial\dispatch.pyc", line 51, in _runcatch File "mercurial\dispatch.pyc", line 372, in _dispatch File "mercurial\dispatch.pyc", line 425, in _runcommand File "mercurial\dispatch.pyc", line 381, in checkargs File "mercurial\dispatch.pyc", line 366, in <lambda> File "/develop/hg\hgsubversion__init__.py", line 14, in svn_fetch return fetch_command.fetch_revisions(ui, svn_url, hg_repo_path, **opts) File "/develop/hg\hgsubversion\fetch_command.py", line 105, in fetch_revisions replay_convert_rev(hg_editor, svn, r) File "/develop/hg\hgsubversion\fetch_command.py", line 132, in replay_convert_rev svn.get_replay(r.revnum, hg_editor) File "/develop/hg\hgsubversion\svnwrap\svn_swig_wrapper.py", line 303, in get_replay e_baton, self.pool) File "libsvn\ra.pyc", line 887, in svn_ra_replay svn.core.SubversionException: ('The requested report is unknown.', 200007) }}}

The TracHacks seems to run svn 1.3.2 on apache, so it doesn't have replay feature. svn_swig_wrap has a detection of ra.replay() fail but it does not handle the error above. I don't know the error means absence of replay feature, I sucessed with following patch by fallback to use stupid_svn_serer_pull_rev() :

{{{ diff -r c45a4f6ff8c3 svnwrap/svn_swig_wrapper.py --- a/svnwrap/svn_swig_wrapper.py Sat Oct 11 20:54:13 2008 +0900 +++ b/svnwrap/svn_swig_wrapper.py Sat Oct 11 21:14:51 2008 +0900 @@ -304,7 +304,9 @@ except core.SubversionException, e: # can I depend on this number being constant? if (e.message == "Server doesn't support the replay command" - or e.apr_err == 170003): + or e.apr_err == 170003 + or e.message == 'The requested report is unknown.' + or e.apr_err == 200007): raise SubversionRepoCanNotReplay, ('This Subversion server ' 'is older than 1.4.0, and cannot satisfy replay requests.') else:


Comments (2)

  1. Shun-ichi Goto reporter

    Additional info: The report above is the case of running on win32. On debian etch, I've successed without patch.

    BTW, I wrote "fallback and success", but the result is not yet enough. I should fix something for stupid_svn_server_pull_rev() which fails tests on win32.

  2. Log in to comment