1340
1339
to indicate which LogRevision attributes it supports:
1342
1341
- supports_delta must be True if this log formatter supports delta.
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.
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.
1347
1346
- supports_merge_revisions must be True if this log formatter supports
1348
merge revisions. If not, then only mainline revisions will be passed
1347
merge revisions. If not, then only mainline revisions will be passed
1351
1350
- preferred_levels is the number of levels this formatter defaults to.
1352
The default value is zero meaning display all levels.
1353
This value is only relevant if supports_merge_revisions is True.
1351
The default value is zero meaning display all levels.
1352
This value is only relevant if supports_merge_revisions is True.
1355
1354
- supports_tags must be True if this log formatter supports tags.
1356
Otherwise the tags attribute may not be populated.
1355
Otherwise the tags attribute may not be populated.
1358
1357
- supports_diff must be True if this log formatter supports diffs.
1359
Otherwise the diff attribute may not be populated.
1358
Otherwise the diff attribute may not be populated.
1361
1360
Plugins can register functions to show custom revision properties using
1362
1361
the properties_handler_registry. The registered function
1363
must respect the following interface description::
1362
must respect the following interface description:
1365
1363
def my_show_properties(properties_dict):
1366
1364
# code that returns a dict {'name':'value'} of the properties
1731
1729
def log_string(self, revno, rev, max_chars, tags=None, prefix=''):
1732
1730
"""Format log info into one string. Truncate tail of 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
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