diff hgext/convert/__init__.py @ 5521:03496d4fa509

convert: display all errors if we couldn't open the source repo This should give the user a better hint of what's going wrong. Improve some error messages. In particular, mention "CVS checkout" instead of "CVS repo". Fixes issue822 and issue826.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 09 Nov 2007 20:21:35 -0200
parents 247af577fe29
children 6ffca2bf23da badbefa55972
line wrap: on
line diff
--- a/hgext/convert/__init__.py	Fri Nov 09 20:21:35 2007 -0200
+++ b/hgext/convert/__init__.py	Fri Nov 09 20:21:35 2007 -0200
@@ -32,12 +32,16 @@
     ]
 
 def convertsource(ui, path, type, rev):
+    exceptions = []
     for name, source in source_converters:
         try:
             if not type or name == type:
                 return source(ui, path, rev)
         except NoRepo, inst:
-            ui.note(_("convert: %s\n") % inst)
+            exceptions.append(inst)
+    if not ui.quiet:
+        for inst in exceptions:
+            ui.write(_("%s\n") % inst)
     raise util.Abort('%s: unknown repository type' % path)
 
 def convertsink(ui, path, type):