convert: do not output when trying to load svn bindings
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Sun, 07 Oct 2007 20:45:10 +0200
changeset 5415 1d53a75ea0fc
parent 5414 eb58722d282f
child 5416 ca890c0c3f1f
convert: do not output when trying to load svn bindings
hgext/convert/__init__.py
hgext/convert/subversion.py
--- a/hgext/convert/__init__.py	Sun Oct 07 20:44:54 2007 +0200
+++ b/hgext/convert/__init__.py	Sun Oct 07 20:45:10 2007 +0200
@@ -26,8 +26,10 @@
     for c in source_converters:
         try:
             return c.getcommit and c(ui, path, **opts)
-        except (AttributeError, NoRepo):
+        except AttributeError:
             pass
+        except NoRepo, inst:
+            ui.note(_("convert: %s\n") % inst)
     raise util.Abort('%s: unknown repository type' % path)
 
 def convertsink(ui, path):
@@ -36,8 +38,10 @@
     for c in sink_converters:
         try:
             return c.putcommit and c(ui, path)
-        except (AttributeError, NoRepo):
+        except AttributeError:
             pass
+        except NoRepo, inst:
+            ui.note(_("convert: %s\n") % inst)
     raise util.Abort('%s: unknown repository type' % path)
 
 class converter(object):
--- a/hgext/convert/subversion.py	Sun Oct 07 20:44:54 2007 +0200
+++ b/hgext/convert/subversion.py	Sun Oct 07 20:45:10 2007 +0200
@@ -100,9 +100,7 @@
         try:
             SubversionException
         except NameError:
-            msg = 'subversion python bindings could not be loaded\n'
-            ui.warn(msg)
-            raise NoRepo(msg)
+            raise NoRepo('subversion python bindings could not be loaded')
 
         self.encoding = locale.getpreferredencoding()
         self.lastrevs = {}