mercurial/templater.py
changeset 10282 08a0f04b56bd
parent 10264 d6512b3e9ac0
child 10339 23e608f42f2c
equal deleted inserted replaced
10281:e7d3b509af8b 10282:08a0f04b56bd
    75         v = get(key)
    75         v = get(key)
    76         if not hasattr(v, '__iter__'):
    76         if not hasattr(v, '__iter__'):
    77             raise SyntaxError(_("error expanding '%s%%%s'") % (key, format))
    77             raise SyntaxError(_("error expanding '%s%%%s'") % (key, format))
    78         lm = map.copy()
    78         lm = map.copy()
    79         for i in v:
    79         for i in v:
    80             if isinstance(i, dict): 
    80             if isinstance(i, dict):
    81                 lm.update(i)
    81                 lm.update(i)
    82                 yield self.process(format, lm)
    82                 yield self.process(format, lm)
    83             else:
    83             else:
    84                 # v is not an iterable of dicts, this happen when 'key'
    84                 # v is not an iterable of dicts, this happen when 'key'
    85                 # has been fully expanded already and format is useless.
    85                 # has been fully expanded already and format is useless.
   242 
   242 
   243     if isinstance(styles, str):
   243     if isinstance(styles, str):
   244         styles = [styles]
   244         styles = [styles]
   245 
   245 
   246     for style in styles:
   246     for style in styles:
   247     	
       
   248         if not style:
   247         if not style:
   249             continue
   248             continue
   250         locations = [os.path.join(style, 'map'), 'map-' + style]
   249         locations = [os.path.join(style, 'map'), 'map-' + style]
   251         locations.append('map')
   250         locations.append('map')
   252 
   251