comparison hgext/convert/__init__.py @ 5415:1d53a75ea0fc

convert: do not output when trying to load svn bindings
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 07 Oct 2007 20:45:10 +0200
parents eb58722d282f
children 6fa5258be3d4
comparison
equal deleted inserted replaced
5414:eb58722d282f 5415:1d53a75ea0fc
24 mercurial_source, darcs_source] 24 mercurial_source, darcs_source]
25 def convertsource(ui, path, **opts): 25 def convertsource(ui, path, **opts):
26 for c in source_converters: 26 for c in source_converters:
27 try: 27 try:
28 return c.getcommit and c(ui, path, **opts) 28 return c.getcommit and c(ui, path, **opts)
29 except (AttributeError, NoRepo): 29 except AttributeError:
30 pass 30 pass
31 except NoRepo, inst:
32 ui.note(_("convert: %s\n") % inst)
31 raise util.Abort('%s: unknown repository type' % path) 33 raise util.Abort('%s: unknown repository type' % path)
32 34
33 def convertsink(ui, path): 35 def convertsink(ui, path):
34 if not os.path.isdir(path): 36 if not os.path.isdir(path):
35 raise util.Abort("%s: not a directory" % path) 37 raise util.Abort("%s: not a directory" % path)
36 for c in sink_converters: 38 for c in sink_converters:
37 try: 39 try:
38 return c.putcommit and c(ui, path) 40 return c.putcommit and c(ui, path)
39 except (AttributeError, NoRepo): 41 except AttributeError:
40 pass 42 pass
43 except NoRepo, inst:
44 ui.note(_("convert: %s\n") % inst)
41 raise util.Abort('%s: unknown repository type' % path) 45 raise util.Abort('%s: unknown repository type' % path)
42 46
43 class converter(object): 47 class converter(object):
44 def __init__(self, ui, source, dest, revmapfile, opts): 48 def __init__(self, ui, source, dest, revmapfile, opts):
45 49