~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: James Westby
  • Date: 2009-02-26 19:21:53 UTC
  • mto: This revision was merged to the branch mainline in revision 4077.
  • Revision ID: jw+debian@jameswestby.net-20090226192153-wcqvwsjb5cn37lb9
Allow specifying multiple authors for a revision.

The revision property "author" is now a "\n"-separated list of authors.

--author can be specified multiple times to populate that list at commit
time.

get_apparent_author() is deprecated in favour of get_apparent_authors(),
which will return a list.

Some things (e.g. annotate) still just use the first item from that list,
but there is now support for other code to use all of the authors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1174
1174
        return address
1175
1175
 
1176
1176
    def short_author(self, rev):
1177
 
        name, address = config.parse_username(rev.get_apparent_author())
 
1177
        name, address = config.parse_username(rev.get_apparent_authors()[0])
1178
1178
        if name:
1179
1179
            return name
1180
1180
        return address
1218
1218
 
1219
1219
        author = revision.rev.properties.get('author', None)
1220
1220
        if author is not None:
1221
 
            to_file.write(indent + 'author: %s\n' % (author,))
 
1221
            to_file.write(indent + 'author: %s\n' % (" ".join(author.split("\n")),))
1222
1222
        to_file.write(indent + 'committer: %s\n' % (revision.rev.committer,))
1223
1223
 
1224
1224
        branch_nick = revision.rev.properties.get('branch-nick', None)