# HG changeset patch # User Jonathan Kotta # Date 1268189888 21600 # Node ID 5e9ab25e01124d609452d0eb99e7e83840ea1c02 # Parent f360e1629f5dcac439858892f84d196f1f7005ba handle nonexistant svn repositories, fixes issue 137 diff --git a/hgsubversion/svnwrap/svn_swig_wrapper.py b/hgsubversion/svnwrap/svn_swig_wrapper.py --- a/hgsubversion/svnwrap/svn_swig_wrapper.py +++ b/hgsubversion/svnwrap/svn_swig_wrapper.py @@ -401,11 +401,13 @@ class SubversionRepo(object): callback, self.pool) except core.SubversionException, e: - if e.apr_err not in [core.SVN_ERR_FS_NOT_FOUND]: - raise - else: + if e.apr_err == core.SVN_ERR_FS_NOT_FOUND: raise hgutil.Abort('%s not found at revision %d!' % (self.subdir.rstrip('/'), stop)) + elif e.apr_err == core.SVN_ERR_FS_NO_SUCH_REVISION: + raise hgutil.Abort(e.message) + else: + raise while len(revisions) > 1: yield revisions.popleft()