changeset 5414:eb58722d282f

convert: split converters into sink/source
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 07 Oct 2007 20:44:54 +0200
parents 719fd175181f
children 1d53a75ea0fc
files hgext/convert/__init__.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/__init__.py	Sun Oct 07 19:03:32 2007 +0200
+++ b/hgext/convert/__init__.py	Sun Oct 07 20:44:54 2007 +0200
@@ -19,11 +19,11 @@
 
 commands.norepo += " convert debugsvnlog"
 
-converters = [convert_cvs, convert_git, convert_svn, mercurial_source,
-              mercurial_sink, darcs_source]
-
+sink_converters = [mercurial_sink]
+source_converters = [convert_cvs, convert_git, convert_svn,
+                     mercurial_source, darcs_source]
 def convertsource(ui, path, **opts):
-    for c in converters:
+    for c in source_converters:
         try:
             return c.getcommit and c(ui, path, **opts)
         except (AttributeError, NoRepo):
@@ -33,7 +33,7 @@
 def convertsink(ui, path):
     if not os.path.isdir(path):
         raise util.Abort("%s: not a directory" % path)
-    for c in converters:
+    for c in sink_converters:
         try:
             return c.putcommit and c(ui, path)
         except (AttributeError, NoRepo):