Show More
@@ -1126,6 +1126,10 def gettemplate(ui, tmpl, style): | |||||
1126 | tmpl = templater.parsestring(t, quoted=False) |
|
1126 | tmpl = templater.parsestring(t, quoted=False) | |
1127 | return tmpl, None |
|
1127 | return tmpl, None | |
1128 |
|
1128 | |||
|
1129 | if tmpl == 'list': | |||
|
1130 | ui.write(_("available styles: %s\n") % templater.stylelist()) | |||
|
1131 | raise util.Abort(_("specify a template")) | |||
|
1132 | ||||
1129 | # perhaps it's a path to a map or a template |
|
1133 | # perhaps it's a path to a map or a template | |
1130 | if ('/' in tmpl or '\\' in tmpl) and os.path.isfile(tmpl): |
|
1134 | if ('/' in tmpl or '\\' in tmpl) and os.path.isfile(tmpl): | |
1131 | # is it a mapfile for a style? |
|
1135 | # is it a mapfile for a style? |
@@ -4129,6 +4129,10 def log(ui, repo, *pats, **opts): | |||||
4129 |
|
4129 | |||
4130 | hg log -k bug --template "{rev}\\n" |
|
4130 | hg log -k bug --template "{rev}\\n" | |
4131 |
|
4131 | |||
|
4132 | - list available log templates:: | |||
|
4133 | ||||
|
4134 | hg log -T list | |||
|
4135 | ||||
4132 | - check if a given changeset is included is a tagged release:: |
|
4136 | - check if a given changeset is included is a tagged release:: | |
4133 |
|
4137 | |||
4134 | hg log -r "a21ccf and ancestor(1.9)" |
|
4138 | hg log -r "a21ccf and ancestor(1.9)" |
@@ -485,6 +485,11 Error if no style: | |||||
485 | (available styles: bisect, changelog, compact, default, phases, xml) |
|
485 | (available styles: bisect, changelog, compact, default, phases, xml) | |
486 | [255] |
|
486 | [255] | |
487 |
|
487 | |||
|
488 | $ hg log -T list | |||
|
489 | available styles: bisect, changelog, compact, default, phases, xml | |||
|
490 | abort: specify a template | |||
|
491 | [255] | |||
|
492 | ||||
488 | Error if style missing key: |
|
493 | Error if style missing key: | |
489 |
|
494 | |||
490 | $ echo 'q = q' > t |
|
495 | $ echo 'q = q' > t |
General Comments 0
You need to be logged in to leave comments.
Login now