convert: rename a class and a function
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Sat, 01 Sep 2007 02:49:18 -0300
changeset 5281 a176f9c8b26e
parent 5280 11e1e574da02
child 5282 22ddde515fda
convert: rename a class and a function
hgext/convert/__init__.py
--- a/hgext/convert/__init__.py	Sat Sep 01 02:49:18 2007 -0300
+++ b/hgext/convert/__init__.py	Sat Sep 01 02:49:18 2007 -0300
@@ -38,7 +38,7 @@
             pass
     raise util.Abort('%s: unknown repository type' % path)
 
-class convert(object):
+class converter(object):
     def __init__(self, ui, source, dest, revmapfile, filemapper, opts):
 
         self.source = source
@@ -363,7 +363,7 @@
     def active(self):
         return bool(self.include or self.exclude or self.rename)
 
-def _convert(ui, src, dest=None, revmapfile=None, **opts):
+def convert(ui, src, dest=None, revmapfile=None, **opts):
     """Convert a foreign SCM repository to a Mercurial one.
 
     Accepted source formats:
@@ -462,14 +462,14 @@
             revmapfile = os.path.join(destc, "map")
 
 
-    c = convert(ui, srcc, destc, revmapfile, filemapper(ui, opts['filemap']),
-                opts)
+    c = converter(ui, srcc, destc, revmapfile, filemapper(ui, opts['filemap']),
+                  opts)
     c.convert()
 
 
 cmdtable = {
     "convert":
-        (_convert,
+        (convert,
          [('A', 'authors', '', 'username mapping filename'),
           ('', 'filemap', '', 'remap file names using contents of file'),
           ('r', 'rev', '', 'import up to target revision REV'),