modules : tcl modules handle 'conflict' directive. This should completely cover the functionality in #498
This commit is contained in:
parent
18a241fe21
commit
50b148ca22
@ -497,3 +497,19 @@ def header(self):
|
|||||||
header += 'puts stderr "%s"\n' % line
|
header += 'puts stderr "%s"\n' % line
|
||||||
header += '}\n\n'
|
header += '}\n\n'
|
||||||
return header
|
return header
|
||||||
|
|
||||||
|
def module_specific_content(self, configuration):
|
||||||
|
naming_tokens = self.tokens
|
||||||
|
# Conflict
|
||||||
|
conflict_format = configuration.get('conflict', '')
|
||||||
|
if conflict_format:
|
||||||
|
for naming_dir, conflict_dir in zip(self.naming_scheme.split('/'), conflict_format.split('/')):
|
||||||
|
if naming_dir != conflict_dir:
|
||||||
|
message = 'Conflict scheme does not match naming scheme [{spec}]\n\n'
|
||||||
|
message += 'naming scheme : "{nformat}"\n'
|
||||||
|
message += 'conflict scheme : "{cformat}"\n'
|
||||||
|
raise tty.error(
|
||||||
|
message.format(spec=self.spec, nformat=self.naming_scheme, cformat=conflict_format)
|
||||||
|
)
|
||||||
|
conflict_format = 'conflict ' + conflict_format
|
||||||
|
yield conflict_format.format(**naming_tokens)
|
||||||
|
Loading…
Reference in New Issue
Block a user