changeset 4447:af013ae3ca10

use documented convert-repo interface
author Daniel Holth <dholth@fastmail.fm>
date Wed, 16 May 2007 01:10:12 -0400
parents 1b75e0eff532
children 7eb604da8764
files contrib/convert-repo
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/convert-repo
+++ b/contrib/convert-repo
@@ -30,7 +30,7 @@ from mercurial import hg, ui, util, fanc
 class Abort(Exception): pass
 class NoRepo(Exception): pass
 
-class commit:
+class commit(object):
     def __init__(self, **parts):
         for x in "author date desc parents".split():
             if not x in parts:
@@ -56,7 +56,7 @@ def recode(s):
         except:
             return s.decode("utf-8", "replace").encode("utf-8")
 
-class converter_source:
+class converter_source(object):
     """Conversion source interface"""
 
     def __init__(self, path):
@@ -91,7 +91,7 @@ class converter_source:
         """Return the tags as a dictionary of name: revision"""
         raise NotImplementedError()
 
-class converter_sink:
+class converter_sink(object):
     """Conversion sink (target) interface"""
 
     def __init__(self, path):
@@ -138,7 +138,7 @@ class converter_sink:
 
 
 # CVS conversion code inspired by hg-cvs-import and git-cvsimport
-class convert_cvs:
+class convert_cvs(converter_source):
     def __init__(self, path):
         self.path = path
         cvs = os.path.join(path, "CVS")
@@ -369,7 +369,7 @@ class convert_cvs:
     def gettags(self):
         return self.tags
 
-class convert_git:
+class convert_git(converter_source):
     def __init__(self, path):
         if os.path.isdir(path + "/.git"):
             path += "/.git"
@@ -455,7 +455,7 @@ class convert_git:
 
         return tags
 
-class convert_mercurial:
+class convert_mercurial(converter_sink):
     def __init__(self, path):
         self.path = path
         u = ui.ui()
@@ -552,7 +552,7 @@ def converter(path):
             pass
     abort("%s: unknown repository type\n" % path)
 
-class convert:
+class convert(object):
     def __init__(self, source, dest, mapfile, opts):
 
         self.source = source