~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revision.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:
217
217
                symbol_versioning.deprecated_in((1, 13, 0)),
218
218
                r.get_apparent_author)
219
219
        self.assertEqual('B', author)
220
 
        r.properties['author'] = 'B\nC'
 
220
        r.properties['authors'] = 'C\nD'
221
221
        author = self.applyDeprecated(
222
222
                symbol_versioning.deprecated_in((1, 13, 0)),
223
223
                r.get_apparent_author)
224
 
        self.assertEqual('B', author)
 
224
        self.assertEqual('C', author)
225
225
 
226
226
    def test_get_apparent_authors(self):
227
227
        r = revision.Revision('1')
229
229
        self.assertEqual(['A'], r.get_apparent_authors())
230
230
        r.properties['author'] = 'B'
231
231
        self.assertEqual(['B'], r.get_apparent_authors())
232
 
        r.properties['author'] = 'B\nC'
233
 
        self.assertEqual(['B', 'C'], r.get_apparent_authors())
 
232
        r.properties['authors'] = 'C\nD'
 
233
        self.assertEqual(['C', 'D'], r.get_apparent_authors())