/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/delta.py

  • Committer: Martin
  • Date: 2017-05-24 20:47:06 UTC
  • mto: This revision was merged to the branch mainline in revision 6635.
  • Revision ID: gzlist@googlemail.com-20170524204706-jvole7jqnplsj8ts
Rename report_delta param from filter to predicate with tests and release notes

Show diffs side-by-side

added added

removed removed

Lines of Context:
349
349
        reporter.report(file_id, path, versioned_change, renamed, modified,
350
350
                        exe_change, kind)
351
351
 
352
 
def report_delta(to_file, delta, short_status=False, show_ids=False, 
353
 
         show_unchanged=False, indent='', filter=None, classify=True):
 
352
 
 
353
def report_delta(to_file, delta, short_status=False, show_ids=False,
 
354
        show_unchanged=False, indent='', predicate=None, classify=True):
354
355
    """Output this delta in status-like form to to_file.
355
356
 
356
357
    :param to_file: A file-like object where the output is displayed.
366
367
    :param indent: Added at the beginning of all output lines (for merged
367
368
        revisions).
368
369
 
369
 
    :param filter: A callable receiving a path and a file id and
 
370
    :param predicate: A callable receiving a path and a file id and
370
371
        returning True if the path should be displayed.
371
372
 
372
373
    :param classify: Add special symbols to indicate file kind.
417
418
 
418
419
            for item in files:
419
420
                path, file_id, kind = item[:3]
420
 
                if (filter is not None and not filter(path, file_id)):
 
421
                if (predicate is not None and not predicate(path, file_id)):
421
422
                    continue
422
423
                if not header_shown and not short_status:
423
424
                    to_file.write(indent + long_status_name + ':\n')