Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 22588:cd1b43226b34
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 30 Sep 2014 18:22:58 -0500 |
parents | f528bfb25b45 4fe5fa49eac8 |
children | bf0ecb224316 |
comparison
equal
deleted
inserted
replaced
22587:c3c3dd31fe1c | 22588:cd1b43226b34 |
---|---|
1213 """ | 1213 """ |
1214 Find the template matching the given template spec or style. | 1214 Find the template matching the given template spec or style. |
1215 """ | 1215 """ |
1216 | 1216 |
1217 # ui settings | 1217 # ui settings |
1218 if not tmpl and not style: | 1218 if not tmpl and not style: # template are stronger than style |
1219 tmpl = ui.config('ui', 'logtemplate') | 1219 tmpl = ui.config('ui', 'logtemplate') |
1220 if tmpl: | 1220 if tmpl: |
1221 try: | 1221 try: |
1222 tmpl = templater.parsestring(tmpl) | 1222 tmpl = templater.parsestring(tmpl) |
1223 except SyntaxError: | 1223 except SyntaxError: |
1224 tmpl = templater.parsestring(tmpl, quoted=False) | 1224 tmpl = templater.parsestring(tmpl, quoted=False) |
1225 return tmpl, None | 1225 return tmpl, None |
1226 else: | 1226 else: |
1227 style = util.expandpath(ui.config('ui', 'style', '')) | 1227 style = util.expandpath(ui.config('ui', 'style', '')) |
1228 | 1228 |
1229 if style: | 1229 if not tmpl and style: |
1230 mapfile = style | 1230 mapfile = style |
1231 if not os.path.split(mapfile)[0]: | 1231 if not os.path.split(mapfile)[0]: |
1232 mapname = (templater.templatepath('map-cmdline.' + mapfile) | 1232 mapname = (templater.templatepath('map-cmdline.' + mapfile) |
1233 or templater.templatepath(mapfile)) | 1233 or templater.templatepath(mapfile)) |
1234 if mapname: | 1234 if mapname: |