comparison hgext/convert/monotone.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 a0939666b836
children 93943eef696f
comparison
equal deleted inserted replaced
35175:e0a1b9ee93cd 35176:671aba341d90
17 ) 17 )
18 18
19 from . import common 19 from . import common
20 20
21 class monotone_source(common.converter_source, common.commandline): 21 class monotone_source(common.converter_source, common.commandline):
22 def __init__(self, ui, path=None, revs=None): 22 def __init__(self, ui, repotype, path=None, revs=None):
23 common.converter_source.__init__(self, ui, path, revs) 23 common.converter_source.__init__(self, ui, repotype, path, revs)
24 if revs and len(revs) > 1: 24 if revs and len(revs) > 1:
25 raise error.Abort(_('monotone source does not support specifying ' 25 raise error.Abort(_('monotone source does not support specifying '
26 'multiple revs')) 26 'multiple revs'))
27 common.commandline.__init__(self, ui, 'mtn') 27 common.commandline.__init__(self, ui, 'mtn')
28 28