revset: use spanset.isdescending in multiple simple places
We call the method directly instead of duplicating checks.
Benchmarks show no performances harmed in the process.
revset: wider definition of ascending and descending for spanset
Before this patches, empty spanset were seen as neither ascending nor
descending. This is mathematically wrong and create some edges case. We put
`isascending` and `isdescending` back on track so we can use them to simplify
some of the spanset code.
Benchmarks show no performances harmed in the process.
annotate: port to generic templater enabled by hidden -T option
If the selected formatter is other than plainformatter, raw data are passed
to the formatter. In this case, it isn't necessary (and not possible) to
calculate column widths.
Field names are substituted to be the same as "log" command.
There are a few limitations:
- "binary file" message is not included in formatted output.
- no data structure for multiple files. all lines are packed to single list.
annotate: split functions to get data without applying text formatting
This prepares for porting to generic templater API, where raw data should
be passed to the formatter.
makefunc() is necessary to build closure in list comprehension.
annotate: build format string separately from annotation data
This prepares for porting to generic templater API.
Note that we cannot use '%*s' to pad white spaces because it doesn't take
into account character widths, as described in
4f5a6df2af92.