##// END OF EJS Templates
convert/svn: abort operation when python bindings are not available...
Azhagu Selvan SP -
r13480:69418d45 stable
parent child Browse files
Show More
@@ -36,7 +36,7 b' try:'
36 category=DeprecationWarning)
36 category=DeprecationWarning)
37
37
38 except ImportError:
38 except ImportError:
39 pass
39 svn = None
40
40
41 class SvnPathNotFound(Exception):
41 class SvnPathNotFound(Exception):
42 pass
42 pass
@@ -209,11 +209,8 b' class svn_source(converter_source):'
209 issvnurl(ui, url)):
209 issvnurl(ui, url)):
210 raise NoRepo(_("%s does not look like a Subversion repository")
210 raise NoRepo(_("%s does not look like a Subversion repository")
211 % url)
211 % url)
212
212 if svn is None:
213 try:
213 raise MissingTool(_('Could not load Subversion python bindings'))
214 SubversionException
215 except NameError:
216 raise MissingTool(_('Subversion python bindings could not be loaded'))
217
214
218 try:
215 try:
219 version = svn.core.SVN_VER_MAJOR, svn.core.SVN_VER_MINOR
216 version = svn.core.SVN_VER_MAJOR, svn.core.SVN_VER_MINOR
@@ -960,6 +957,9 b' class svn_sink(converter_sink, commandli'
960 return self.join('hg-authormap')
957 return self.join('hg-authormap')
961
958
962 def __init__(self, ui, path):
959 def __init__(self, ui, path):
960
961 if svn is None:
962 raise MissingTool(_('Could not load Subversion python bindings'))
963 converter_sink.__init__(self, ui, path)
963 converter_sink.__init__(self, ui, path)
964 commandline.__init__(self, ui, 'svn')
964 commandline.__init__(self, ui, 'svn')
965 self.delete = []
965 self.delete = []
General Comments 0
You need to be logged in to leave comments. Login now