def bzr(registry, xml_parent, data):
 mapping = [('url', 'source', None), ('clean-tree', 'cleantree', False), ('lightweight-checkout', 'checkout', False)]
 scm_element = XML.SubElement(xml_parent, 'scm', {'class': 'hudson.plugins.bazaar.BazaarSCM'})
 convert_mapping_to_xml(scm_element, data, mapping, fail_required=True)
 browser_name_to_class = {'loggerhead': 'Loggerhead', 'opengrok': 'OpenGrok'}
 browser = data.get('browser', 'auto')
 if (browser == 'auto'):
  return
 if (browser not in browser_name_to_class):
  raise InvalidAttributeError('browser', browser, browser_name_to_class.keys())
 browser_element = XML.SubElement(scm_element, 'browser', {'class': 'hudson.plugins.bazaar.browsers.{0}'.format(browser_name_to_class[browser])})
 XML.SubElement(browser_element, 'url').text = data['browser-url']
 if (browser == 'opengrok'):
  XML.SubElement(browser_element, 'rootModule').text = data['opengrok-root-module']

def bzr ( registry , xml_parent , data ) : mapping = [ ( 'url' , 'source' , None ) , ( 'clean-tree' , 'cleantree' , False ) , ( 'lightweight-checkout' , 'checkout' , False ) ] scm_element = XML . SubElement ( xml_parent , 'scm' , { 'class' : 'hudson.plugins.bazaar.BazaarSCM' } ) convert_mapping_to_xml ( scm_element , data , mapping , fail_required = True ) browser_name_to_class = { 'loggerhead' : 'Loggerhead' , 'opengrok' : 'OpenGrok' } browser = data . get ( 'browser' , 'auto' ) if ( browser == 'auto' ) : return if ( browser not in browser_name_to_class ) : raise InvalidAttributeError ( 'browser' , browser , browser_name_to_class . keys ( ) ) browser_element = XML . SubElement ( scm_element , 'browser' , { 'class' : 'hudson.plugins.bazaar.browsers.{0}' . format ( browser_name_to_class [ browser ] ) } ) XML . SubElement ( browser_element , 'url' ) . text = data [ 'browser-url' ] if ( browser == 'opengrok' ) : XML . SubElement ( browser_element , 'rootModule' ) . text = data [ 'opengrok-root-module' ]
yaml: bzr specifies the bzr scm repository for this job .