~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-16 13:39:39 UTC
  • mto: (5923.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5925.
  • Revision ID: jelmer@samba.org-20110516133939-8u1pc9utas3uw1lt
Require a unicode prompt to be passed into all methods that prompt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1159
1159
    This includes the revisions which directly change the file id,
1160
1160
    and the revisions which merge these changes. So if the
1161
1161
    revision graph is::
1162
 
 
1163
1162
        A-.
1164
1163
        |\ \
1165
1164
        B C E
1340
1339
    to indicate which LogRevision attributes it supports:
1341
1340
 
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.
1346
1345
 
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
1349
 
      to the formatter.
 
1347
        merge revisions.  If not, then only mainline revisions will be passed
 
1348
        to the formatter.
1350
1349
 
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.
1354
1353
 
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.
1357
1356
 
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.
1360
1359
 
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::
1364
 
 
 
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
1367
1365
            # to be shown
1730
1728
 
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
1733
 
 
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
1741
1738
        """
1742
1739
        out = []
1743
1740
        if revno: