comparison hgext/convert/bzr.py @ 35176:671aba341d90

convert: save an indicator of the repo type for sources and sinks This seems like basic info to have, and will be used shortly when deciding whether or not to wrap the class for lfs conversions. The other option is to just add a function to each class. But this seems better in that the strings aren't duplicated, and the constructor for most of these will run even if the VCS isn't installed, so it's easier to catch errors.
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 22 Nov 2017 20:49:01 -0500
parents 6bda8a9d8431
children 15d38e8fcb1e
comparison
equal deleted inserted replaced
35175:e0a1b9ee93cd 35176:671aba341d90
42 supportedkinds = ('file', 'symlink') 42 supportedkinds = ('file', 'symlink')
43 43
44 class bzr_source(common.converter_source): 44 class bzr_source(common.converter_source):
45 """Reads Bazaar repositories by using the Bazaar Python libraries""" 45 """Reads Bazaar repositories by using the Bazaar Python libraries"""
46 46
47 def __init__(self, ui, path, revs=None): 47 def __init__(self, ui, repotype, path, revs=None):
48 super(bzr_source, self).__init__(ui, path, revs=revs) 48 super(bzr_source, self).__init__(ui, repotype, path, revs=revs)
49 49
50 if not os.path.exists(os.path.join(path, '.bzr')): 50 if not os.path.exists(os.path.join(path, '.bzr')):
51 raise common.NoRepo(_('%s does not look like a Bazaar repository') 51 raise common.NoRepo(_('%s does not look like a Bazaar repository')
52 % path) 52 % path)
53 53