~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/delta.py

  • Committer: Arnaud Jeansen
  • Date: 2010-03-19 23:30:42 UTC
  • mto: This revision was merged to the branch mainline in revision 5126.
  • Revision ID: arnaud.jeansen@gmail.com-20100319233042-o8sjknf212u8spyb
Add a unified report_delta method

Show diffs side-by-side

added added

removed removed

Lines of Context:
339
339
        reporter.report(file_id, path, versioned_change, renamed, modified,
340
340
                        exe_change, kind)
341
341
 
 
342
def report_delta(to_file, delta, short_status=False, show_ids=False, 
 
343
         show_unchanged=False, indent='', filter=None):
 
344
    if short_status:
 
345
        __report_delta_short(to_file, delta, show_ids, show_unchanged, 
 
346
                             indent, filter)        
 
347
    else:
 
348
        __report_delta_long(to_file, delta, show_ids, show_unchanged, 
 
349
                             indent, filter)
342
350
 
343
 
def report_short(to_file, delta, show_ids=False, show_unchanged=False,
 
351
def __report_delta_short(to_file, delta, show_ids=False, show_unchanged=False,
344
352
         indent='', filter=None):
345
353
    """Output given delta in status-like form to to_file, using a short format.
346
354
 
432
440
 
433
441
 
434
442
 
435
 
def report_long(to_file, delta, show_ids=False, show_unchanged=False,
 
443
def __report_delta_long(to_file, delta, show_ids=False, show_unchanged=False,
436
444
         indent='', filter=None):
437
445
    """Output given delta in status-like form to to_file.
438
446