~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mutabletree.py

  • Committer: James Westby
  • Date: 2009-02-27 15:14:34 UTC
  • mto: This revision was merged to the branch mainline in revision 4077.
  • Revision ID: jw+debian@jameswestby.net-20090227151434-kk7lqj62fnqmj2ng
Use a new "authors" revision property to allow multiple authors

The "authors" revision property holds a "\n" separated list of
authors.

"author" is still read, but will be overriden by "authors" if
present.

Show diffs side-by-side

added added

removed removed

Lines of Context:
198
198
            if author is not None:
199
199
                raise AssertionError('Specifying both author and authors '
200
200
                        'is not allowed. Specify just authors instead')
201
 
            if 'author' in revprops:
 
201
            if 'author' in revprops or 'authors' in revprops:
202
202
                # XXX: maybe we should just accept one of them?
203
203
                raise AssertionError('author property given twice')
204
204
            if authors:
206
206
                    if '\n' in individual:
207
207
                        raise AssertionError('\\n is not a valid character '
208
208
                                'in an author identity')
209
 
                revprops['author'] = '\n'.join(authors)
 
209
                revprops['authors'] = '\n'.join(authors)
210
210
        if author is not None:
211
211
            symbol_versioning.warn('The parameter author was deprecated'
212
212
                   ' in version 1.13. Use authors instead',
213
213
                   DeprecationWarning)
214
 
            if 'author' in revprops:
 
214
            if 'author' in revprops or 'authors' in revprops:
215
215
                # XXX: maybe we should just accept one of them?
216
216
                raise AssertionError('author property given twice')
217
217
            if '\n' in author:
218
218
                raise AssertionError('\\n is not a valid character '
219
219
                        'in an author identity')
220
 
            revprops['author'] = author
 
220
            revprops['authors'] = author
221
221
        # args for wt.commit start at message from the Commit.commit method,
222
222
        args = (message, ) + args
223
223
        for hook in MutableTree.hooks['start_commit']: