##// END OF EJS Templates
convert: improve reporting of invalid svn bindings
Patrick Mezard -
r7447:4fd92687 default
parent child Browse files
Show More
@@ -32,8 +32,8 b' from mercurial.i18n import _'
32
32
33 from cStringIO import StringIO
33 from cStringIO import StringIO
34
34
35 from common import NoRepo, commit, converter_source, encodeargs, decodeargs
35 from common import NoRepo, MissingTool, commit, encodeargs, decodeargs
36 from common import commandline, converter_sink, mapfile
36 from common import commandline, converter_source, converter_sink, mapfile
37
37
38 try:
38 try:
39 from svn.core import SubversionException, Pool
39 from svn.core import SubversionException, Pool
@@ -155,7 +155,16 b' class svn_source(converter_source):'
155 try:
155 try:
156 SubversionException
156 SubversionException
157 except NameError:
157 except NameError:
158 raise NoRepo('Subversion python bindings could not be loaded')
158 raise MissingTool(_('Subversion python bindings could not be loaded'))
159
160 try:
161 version = svn.core.SVN_VER_MAJOR, svn.core.SVN_VER_MINOR
162 if version < (1, 4):
163 raise MissingTool(_('Subversion python bindings %d.%d found, '
164 '1.4 or later required') % version)
165 except AttributeError:
166 raise MissingTool(_('Subversion python bindings are too old, 1.4 '
167 'or later required'))
159
168
160 self.encoding = locale.getpreferredencoding()
169 self.encoding = locale.getpreferredencoding()
161 self.lastrevs = {}
170 self.lastrevs = {}
General Comments 0
You need to be logged in to leave comments. Login now