Show More
@@ -372,16 +372,31 b' class changeset_printer(object):' | |||||
372 | self.ui.status("\n") |
|
372 | self.ui.status("\n") | |
373 |
|
373 | |||
374 | def show_changeset(ui, repo, opts): |
|
374 | def show_changeset(ui, repo, opts): | |
375 |
|
|
375 | """show one changeset using template or regular display. | |
376 | can pass in 'style' and 'template' options in opts.''' |
|
376 | ||
377 |
|
377 | Display format will be the first non-empty hit of: | ||
|
378 | 1. option 'template' | |||
|
379 | 2. option 'style' | |||
|
380 | 3. [ui] setting 'logtemplate' | |||
|
381 | 4. [ui] setting 'style' | |||
|
382 | If all of these values are either the unset or the empty string, | |||
|
383 | regular display via changeset_printer() is done. | |||
|
384 | """ | |||
|
385 | # options | |||
378 | tmpl = opts.get('template') |
|
386 | tmpl = opts.get('template') | |
|
387 | mapfile = None | |||
379 | if tmpl: |
|
388 | if tmpl: | |
380 | tmpl = templater.parsestring(tmpl, quoted=False) |
|
389 | tmpl = templater.parsestring(tmpl, quoted=False) | |
381 | else: |
|
390 | else: | |
382 | tmpl = ui.config('ui', 'logtemplate') |
|
391 | mapfile = opts.get('style') | |
383 | if tmpl: tmpl = templater.parsestring(tmpl) |
|
392 | # ui settings | |
384 | mapfile = opts.get('style') or ui.config('ui', 'style') |
|
393 | if not mapfile: | |
|
394 | tmpl = ui.config('ui', 'logtemplate') | |||
|
395 | if tmpl: | |||
|
396 | tmpl = templater.parsestring(tmpl) | |||
|
397 | else: | |||
|
398 | mapfile = ui.config('ui', 'style') | |||
|
399 | ||||
385 | if tmpl or mapfile: |
|
400 | if tmpl or mapfile: | |
386 | if mapfile: |
|
401 | if mapfile: | |
387 | if not os.path.isfile(mapfile): |
|
402 | if not os.path.isfile(mapfile): |
General Comments 0
You need to be logged in to leave comments.
Login now