~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_commit.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:
554
554
                     "tree/hello.txt"])
555
555
        last_rev = tree.branch.repository.get_revision(tree.last_revision())
556
556
        properties = last_rev.properties
557
 
        self.assertEqual(u'John D\xf6 <jdoe@example.com>', properties['author'])
 
557
        self.assertEqual(u'John D\xf6 <jdoe@example.com>', properties['authors'])
558
558
 
559
559
    def test_author_no_email(self):
560
560
        """Author's name without an email address is allowed, too."""
565
565
                                "tree/hello.txt")
566
566
        last_rev = tree.branch.repository.get_revision(tree.last_revision())
567
567
        properties = last_rev.properties
568
 
        self.assertEqual('John Doe', properties['author'])
 
568
        self.assertEqual('John Doe', properties['authors'])
569
569
 
570
570
    def test_multiple_authors(self):
571
571
        """Multiple authors can be specyfied, and all are stored."""
576
576
                                "--author='Jane Rey' tree/hello.txt")
577
577
        last_rev = tree.branch.repository.get_revision(tree.last_revision())
578
578
        properties = last_rev.properties
579
 
        self.assertEqual('John Doe\nJane Rey', properties['author'])
 
579
        self.assertEqual('John Doe\nJane Rey', properties['authors'])
580
580
 
581
581
    def test_partial_commit_with_renames_in_tree(self):
582
582
        # this test illustrates bug #140419