mercurial/templater.py
changeset 24303 15afda349b11
parent 24280 6c55e37ba5f2
parent 24296 b73a22d1d9bf
child 24306 6ddc86eedc3b
equal deleted inserted replaced
24302:6e092ea2eff1 24303:15afda349b11
   747 
   747 
   748     if isinstance(styles, str):
   748     if isinstance(styles, str):
   749         styles = [styles]
   749         styles = [styles]
   750 
   750 
   751     for style in styles:
   751     for style in styles:
   752         if not style:
   752         # only plain name is allowed to honor template paths
       
   753         if (not style
       
   754             or style in (os.curdir, os.pardir)
       
   755             or os.sep in style
       
   756             or os.altsep and os.altsep in style):
   753             continue
   757             continue
   754         locations = [os.path.join(style, 'map'), 'map-' + style]
   758         locations = [os.path.join(style, 'map'), 'map-' + style]
   755         locations.append('map')
   759         locations.append('map')
   756 
   760 
   757         for path in paths:
   761         for path in paths: