1339
1340
to indicate which LogRevision attributes it supports:
1341
1342
- supports_delta must be True if this log formatter supports delta.
1342
Otherwise the delta attribute may not be populated. The 'delta_format'
1343
attribute describes whether the 'short_status' format (1) or the long
1344
one (2) should be used.
1343
Otherwise the delta attribute may not be populated. The 'delta_format'
1344
attribute describes whether the 'short_status' format (1) or the long
1345
one (2) should be used.
1346
1347
- supports_merge_revisions must be True if this log formatter supports
1347
merge revisions. If not, then only mainline revisions will be passed
1348
merge revisions. If not, then only mainline revisions will be passed
1350
1351
- preferred_levels is the number of levels this formatter defaults to.
1351
The default value is zero meaning display all levels.
1352
This value is only relevant if supports_merge_revisions is True.
1352
The default value is zero meaning display all levels.
1353
This value is only relevant if supports_merge_revisions is True.
1354
1355
- supports_tags must be True if this log formatter supports tags.
1355
Otherwise the tags attribute may not be populated.
1356
Otherwise the tags attribute may not be populated.
1357
1358
- supports_diff must be True if this log formatter supports diffs.
1358
Otherwise the diff attribute may not be populated.
1359
Otherwise the diff attribute may not be populated.
1360
1361
Plugins can register functions to show custom revision properties using
1361
1362
the properties_handler_registry. The registered function
1362
must respect the following interface description:
1363
must respect the following interface description::
1363
1365
def my_show_properties(properties_dict):
1364
1366
# code that returns a dict {'name':'value'} of the properties
1729
1731
def log_string(self, revno, rev, max_chars, tags=None, prefix=''):
1730
1732
"""Format log info into one string. Truncate tail of string
1731
:param revno: revision number or None.
1732
Revision numbers counts from 1.
1733
:param rev: revision object
1734
:param max_chars: maximum length of resulting string
1735
:param tags: list of tags or None
1736
:param prefix: string to prefix each line
1737
:return: formatted truncated string
1734
:param revno: revision number or None.
1735
Revision numbers counts from 1.
1736
:param rev: revision object
1737
:param max_chars: maximum length of resulting string
1738
:param tags: list of tags or None
1739
:param prefix: string to prefix each line
1740
:return: formatted truncated string