~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: paulbrianstewart at gmail
  • Date: 2011-08-13 23:07:36 UTC
  • mto: This revision was merged to the branch mainline in revision 6069.
  • Revision ID: paulbrianstewart@gmail.com-20110813230736-lqi6eek015wh23yv
Added punctuation to the commit message

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
        if None or 0.
184
184
 
185
185
    :param show_diff: If True, output a diff after each revision.
186
 
 
 
186
    
187
187
    :param match: Dictionary of search lists to use when matching revision
188
188
      properties.
189
189
    """
219
219
# make_log_request_dict() below
220
220
_DEFAULT_REQUEST_PARAMS = {
221
221
    'direction': 'reverse',
222
 
    'levels': None,
 
222
    'levels': 1,
223
223
    'generate_tags': True,
224
224
    'exclude_common_ancestry': False,
225
225
    '_match_using_deltas': True,
228
228
 
229
229
def make_log_request_dict(direction='reverse', specific_fileids=None,
230
230
                          start_revision=None, end_revision=None, limit=None,
231
 
                          message_search=None, levels=None, generate_tags=True,
 
231
                          message_search=None, levels=1, generate_tags=True,
232
232
                          delta_type=None,
233
233
                          diff_type=None, _match_using_deltas=True,
234
234
                          exclude_common_ancestry=False, match=None,
259
259
      matching commit messages
260
260
 
261
261
    :param levels: the number of levels of revisions to
262
 
      generate; 1 for just the mainline; 0 for all levels, or None for
263
 
      a sensible default.
 
262
      generate; 1 for just the mainline; 0 for all levels.
264
263
 
265
264
    :param generate_tags: If True, include tags for matched revisions.
266
265
`
283
282
      range operator or as a graph difference.
284
283
 
285
284
    :param signature: show digital signature information
286
 
 
 
285
      
287
286
    :param match: Dictionary of list of search strings to use when filtering
288
287
      revisions. Keys can be 'message', 'author', 'committer', 'bugs' or
289
 
      the empty string to match any of the preceding properties.
290
 
 
 
288
      the empty string to match any of the preceding properties. 
 
289
      
291
290
    """
292
291
    # Take care of old style message_search parameter
293
292
    if message_search:
326
325
 
327
326
def format_signature_validity(rev_id, repo):
328
327
    """get the signature validity
329
 
 
 
328
    
330
329
    :param rev_id: revision id to validate
331
330
    :param repo: repository of revision
332
331
    :return: human readable string to print to log
395
394
        # Tweak the LogRequest based on what the LogFormatter can handle.
396
395
        # (There's no point generating stuff if the formatter can't display it.)
397
396
        rqst = self.rqst
398
 
        if rqst['levels'] is None or lf.get_levels() > rqst['levels']:
399
 
            # user didn't specify levels, use whatever the LF can handle:
400
 
            rqst['levels'] = lf.get_levels()
401
 
 
 
397
        rqst['levels'] = lf.get_levels()
402
398
        if not getattr(lf, 'supports_tags', False):
403
399
            rqst['generate_tags'] = False
404
400
        if not getattr(lf, 'supports_delta', False):
416
412
 
417
413
    def _generator_factory(self, branch, rqst):
418
414
        """Make the LogGenerator object to use.
419
 
 
 
415
        
420
416
        Subclasses may wish to override this.
421
417
        """
422
418
        return _DefaultLogGenerator(branch, rqst)
971
967
 
972
968
def _update_fileids(delta, fileids, stop_on):
973
969
    """Update the set of file-ids to search based on file lifecycle events.
974
 
 
 
970
    
975
971
    :param fileids: a set of fileids to update
976
972
    :param stop_on: either 'add' or 'remove' - take file-ids out of the
977
973
      fileids set once their add or remove entry is detected respectively
1348
1344
        """Create a LogFormatter.
1349
1345
 
1350
1346
        :param to_file: the file to output to
1351
 
        :param to_exact_file: if set, gives an output stream to which
 
1347
        :param to_exact_file: if set, gives an output stream to which 
1352
1348
             non-Unicode diffs are written.
1353
1349
        :param show_ids: if True, revision-ids are to be displayed
1354
1350
        :param show_timezone: the timezone to use
1590
1586
        if revision.delta is not None:
1591
1587
            # Use the standard status output to display changes
1592
1588
            from bzrlib.delta import report_delta
1593
 
            report_delta(to_file, revision.delta, short_status=False,
 
1589
            report_delta(to_file, revision.delta, short_status=False, 
1594
1590
                         show_ids=self.show_ids, indent=indent)
1595
1591
        if revision.diff is not None:
1596
1592
            to_file.write(indent + 'diff:\n')
1662
1658
        if revision.delta is not None:
1663
1659
            # Use the standard status output to display changes
1664
1660
            from bzrlib.delta import report_delta
1665
 
            report_delta(to_file, revision.delta,
1666
 
                         short_status=self.delta_format==1,
 
1661
            report_delta(to_file, revision.delta, 
 
1662
                         short_status=self.delta_format==1, 
1667
1663
                         show_ids=self.show_ids, indent=indent + offset)
1668
1664
        if revision.diff is not None:
1669
1665
            self.show_diff(self.to_exact_file, revision.diff, '      ')