~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Kent Gibson
  • Date: 2007-05-02 11:02:46 UTC
  • mto: (2568.1.2 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 2570.
  • Revision ID: warthog618@gmail.com-20070502110246-05zkgmrv5vm807ms
Long log format reports deltas on merge revisions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
255
255
    def iter_revisions():
256
256
        # r = revision, n = revno, d = merge depth
257
257
        revision_ids = [r for r, n, d in view_revisions]
258
 
        zeros = set(r for r, n, d in view_revisions if d == 0)
259
258
        num = 9
260
259
        repository = branch.repository
261
260
        while revision_ids:
262
261
            cur_deltas = {}
263
262
            revisions = repository.get_revisions(revision_ids[:num])
264
263
            if generate_delta:
265
 
                delta_revisions = [r for r in revisions if
266
 
                                   r.revision_id in zeros]
267
 
                deltas = repository.get_deltas_for_revisions(delta_revisions)
268
 
                cur_deltas = dict(izip((r.revision_id for r in 
269
 
                                        delta_revisions), deltas))
 
264
                deltas = repository.get_deltas_for_revisions(revisions)
 
265
                cur_deltas = dict(izip((r.revision_id for r in revisions),
 
266
                                       deltas))
270
267
            for revision in revisions:
271
 
                # The delta value will be None unless
272
 
                # 1. verbose is specified, and
273
 
                # 2. the revision is a mainline revision
274
268
                yield revision, cur_deltas.get(revision.revision_id)
275
269
            revision_ids  = revision_ids[num:]
276
270
            num = min(int(num * 1.5), 200)
536
530
            for l in message.split('\n'):
537
531
                print >>to_file,  indent+'  ' + l
538
532
        if revision.delta is not None:
539
 
            revision.delta.show(to_file, self.show_ids)
 
533
            revision.delta.show(to_file, self.show_ids, indent=indent)
540
534
 
541
535
 
542
536
class ShortLogFormatter(LogFormatter):