comparison hgext/convert/common.py @ 5437:71e7c86adcb7

convert: refactor sink initialisation, to remove hardcoding of hg We also introduce options to explicitly set the source and destination repository types. Improve testing of corner cases a little.
author Bryan O'Sullivan <bos@serpentine.com>
date Wed, 10 Oct 2007 15:42:00 -0700
parents b4ae8535f834
children
comparison
equal deleted inserted replaced
5436:b4ae8535f834 5437:71e7c86adcb7
114 class converter_sink(object): 114 class converter_sink(object):
115 """Conversion sink (target) interface""" 115 """Conversion sink (target) interface"""
116 116
117 def __init__(self, ui, path): 117 def __init__(self, ui, path):
118 """Initialize conversion sink (or raise NoRepo("message") 118 """Initialize conversion sink (or raise NoRepo("message")
119 exception if path is not a valid repository)""" 119 exception if path is not a valid repository)
120
121 created is a list of paths to remove if a fatal error occurs
122 later"""
123 self.ui = ui
120 self.path = path 124 self.path = path
121 self.ui = ui 125 self.created = []
122 126
123 def getheads(self): 127 def getheads(self):
124 """Return a list of this repository's heads""" 128 """Return a list of this repository's heads"""
125 raise NotImplementedError() 129 raise NotImplementedError()
126 130