... | @@ -31,21 +31,19 @@ update = rev branch tags | summary |
... | @@ -31,21 +31,19 @@ update = rev branch tags | summary |
|
# templates for widgets that use QTextDocument
|
|
# templates for widgets that use QTextDocument
|
|
[thg-revtemplates]
|
|
[thg-revtemplates]
|
|
# field[.style] = template; or field.label = label
|
|
# field[.style] = template; or field.label = label
|
|
rev = {rev} (<tt>{node|short}</tt>)
|
|
rev = "{rev} (<tt>{node|short}</tt>)"
|
|
rev.compact = {rev}
|
|
rev.compact = "{rev}"
|
|
tags = {tags % '<span class="tag"> {tag|escape} </span> '}
|
|
tags = "{tags % '<span class="tag"> {tag|escape} </span> '}"
|
|
summary = {desc|firstline}
|
|
summary = "{desc|firstline}"
|
|
|
|
|
|
# custom field can be added by user
|
|
# custom field can be added by user
|
|
git = {gitnode}
|
|
git = "{gitnode}"
|
|
|
|
git:label = "Git"
|
|
[thg-revlabels]
|
|
|
|
git = Git
|
|
|
|
|
|
|
|
# templates for log model (repomodel)
|
|
# templates for log model (repomodel)
|
|
[thg-logtemplates]
|
|
[thg-logtemplates]
|
|
rev = {rev}
|
|
rev = "{rev}"
|
|
date = {date|localdate|shortdate}
|
|
date = "{date|localdate|shortdate}"
|
|
~~~~
|
|
~~~~
|
|
|
|
|
|
## API
|
|
## API
|
... | @@ -63,7 +61,7 @@ The following widgets can render HTML subset by using `QTextDocument`: |
... | @@ -63,7 +61,7 @@ The following widgets can render HTML subset by using `QTextDocument`: |
|
|
|
|
|
* `hg preparerevset` and `prepared(name)` predicate allow us to render the
|
|
* `hg preparerevset` and `prepared(name)` predicate allow us to render the
|
|
same query in different styles, and retrieve chunks form the large query.
|
|
same query in different styles, and retrieve chunks form the large query.
|
|
* `thgrevfields(form, style)` template function applies the pre-configured
|
|
* `-T 'thgrevfields(form, style)'` template spec applies the pre-configured
|
|
template.
|
|
template.
|
|
|
|
|
|
Example:
|
|
Example:
|
... | @@ -72,8 +70,8 @@ Example: |
... | @@ -72,8 +70,8 @@ Example: |
|
# execute query, count items, and save it as "cslist0"
|
|
# execute query, count items, and save it as "cslist0"
|
|
$ hg preparerevset cslist0 -r 'outgoing()' --count
|
|
$ hg preparerevset cslist0 -r 'outgoing()' --count
|
|
# retrieve the first 20 items and the last for "prune" dialog in "list" style
|
|
# retrieve the first 20 items and the last for "prune" dialog in "list" style
|
|
$ hg log -r 'limit(prepared(cslist0), 20)' -T '{thgrevfields("prune", "list")}'
|
|
$ hg log -r 'limit(prepared(cslist0), 20)' -T 'thgrevfields("prune", "list")'
|
|
$ hg log -r 'last(prepared(cslist0))' -T '{thgrevfields("prune", "list")}'
|
|
$ hg log -r 'last(prepared(cslist0))' -T 'thgrevfields("prune", "list")'
|
|
~~~~
|
|
~~~~
|
|
|
|
|
|
## Change History
|
|
## Change History
|
... | | ... | |