Show More
@@ -30,7 +30,7 b' from mercurial import hg, ui, util, fanc' | |||
|
30 | 30 | class Abort(Exception): pass |
|
31 | 31 | class NoRepo(Exception): pass |
|
32 | 32 | |
|
33 | class commit: | |
|
33 | class commit(object): | |
|
34 | 34 | def __init__(self, **parts): |
|
35 | 35 | for x in "author date desc parents".split(): |
|
36 | 36 | if not x in parts: |
@@ -56,7 +56,7 b' def recode(s):' | |||
|
56 | 56 | except: |
|
57 | 57 | return s.decode("utf-8", "replace").encode("utf-8") |
|
58 | 58 | |
|
59 | class converter_source: | |
|
59 | class converter_source(object): | |
|
60 | 60 | """Conversion source interface""" |
|
61 | 61 | |
|
62 | 62 | def __init__(self, path): |
@@ -91,7 +91,7 b' class converter_source:' | |||
|
91 | 91 | """Return the tags as a dictionary of name: revision""" |
|
92 | 92 | raise NotImplementedError() |
|
93 | 93 | |
|
94 | class converter_sink: | |
|
94 | class converter_sink(object): | |
|
95 | 95 | """Conversion sink (target) interface""" |
|
96 | 96 | |
|
97 | 97 | def __init__(self, path): |
@@ -138,7 +138,7 b' class converter_sink:' | |||
|
138 | 138 | |
|
139 | 139 | |
|
140 | 140 | # CVS conversion code inspired by hg-cvs-import and git-cvsimport |
|
141 | class convert_cvs: | |
|
141 | class convert_cvs(converter_source): | |
|
142 | 142 | def __init__(self, path): |
|
143 | 143 | self.path = path |
|
144 | 144 | cvs = os.path.join(path, "CVS") |
@@ -369,7 +369,7 b' class convert_cvs:' | |||
|
369 | 369 | def gettags(self): |
|
370 | 370 | return self.tags |
|
371 | 371 | |
|
372 | class convert_git: | |
|
372 | class convert_git(converter_source): | |
|
373 | 373 | def __init__(self, path): |
|
374 | 374 | if os.path.isdir(path + "/.git"): |
|
375 | 375 | path += "/.git" |
@@ -455,7 +455,7 b' class convert_git:' | |||
|
455 | 455 | |
|
456 | 456 | return tags |
|
457 | 457 | |
|
458 | class convert_mercurial: | |
|
458 | class convert_mercurial(converter_sink): | |
|
459 | 459 | def __init__(self, path): |
|
460 | 460 | self.path = path |
|
461 | 461 | u = ui.ui() |
@@ -552,7 +552,7 b' def converter(path):' | |||
|
552 | 552 | pass |
|
553 | 553 | abort("%s: unknown repository type\n" % path) |
|
554 | 554 | |
|
555 | class convert: | |
|
555 | class convert(object): | |
|
556 | 556 | def __init__(self, source, dest, mapfile, opts): |
|
557 | 557 | |
|
558 | 558 | self.source = source |
General Comments 0
You need to be logged in to leave comments.
Login now