~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Aaron Bentley
  • Date: 2009-03-14 00:10:11 UTC
  • mfrom: (4143 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4196.
  • Revision ID: aaron@aaronbentley.com-20090314001011-p75quyng73uix7t8
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1374
1374
        return self.truncate(prefix + " ".join(out).rstrip('\n'), max_chars)
1375
1375
 
1376
1376
 
1377
 
class ChangeLogLogFormatter(LogFormatter):
 
1377
class GnuChangelogLogFormatter(LogFormatter):
1378
1378
 
1379
1379
    supports_merge_revisions = True
1380
1380
    supports_delta = True
1381
 
    supports_tags = True
1382
1381
 
1383
1382
    def log_revision(self, revision):
1384
1383
        """Log a revision, either merged or not."""
1392
1391
        committer_str = revision.rev.committer.replace (' <', '  <')
1393
1392
        to_file.write('%s  %s\n\n' % (date_str,committer_str))
1394
1393
 
1395
 
        if revision.delta is not None:
 
1394
        if revision.delta is not None and revision.delta.has_changed():
1396
1395
            for c in revision.delta.added + revision.delta.removed + revision.delta.modified:
1397
1396
                path, = c[:1]
1398
1397
                to_file.write('\t* %s:\n' % (path,))
1440
1439
                                'Detailed log format')
1441
1440
log_formatter_registry.register('line', LineLogFormatter,
1442
1441
                                'Log format with one line per revision')
1443
 
log_formatter_registry.register(
1444
 
    'gnu-changelog', ChangeLogLogFormatter,
1445
 
    'Format used by GNU ChangeLog files')
 
1442
log_formatter_registry.register('gnu-changelog', GnuChangelogLogFormatter,
 
1443
                                'Format used by GNU ChangeLog files')
1446
1444
 
1447
1445
 
1448
1446
def register_formatter(name, formatter):