/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_commit.py

merge bzr.dev r4154

Show diffs side-by-side

added added

removed removed

Lines of Context:
517
517
        self.build_tree(['tree/hello.txt'])
518
518
        tree.add('hello.txt')
519
519
        self.run_bzr_error(
520
 
            ["Invalid bug identifier for %s. Commit refused." % 'lp:orange'],
 
520
            ["Did not understand bug identifier orange: Must be an integer. "
 
521
             "See \"bzr help bugs\" for more information on this feature.\n"
 
522
             "Commit refused."],
521
523
            'commit -m add-b --fixes=lp:orange',
522
524
            working_dir='tree')
523
525
 
527
529
        self.build_tree(['tree/hello.txt'])
528
530
        tree.add('hello.txt')
529
531
        self.run_bzr_error(
530
 
            [r"Invalid bug orange. Must be in the form of 'tag:id'\. "
 
532
            [r"Invalid bug orange. Must be in the form of 'tracker:id'\. "
 
533
             r"See \"bzr help bugs\" for more information on this feature.\n"
531
534
             r"Commit refused\."],
532
535
            'commit -m add-b --fixes=orange',
533
536
            working_dir='tree')
554
557
                     "tree/hello.txt"])
555
558
        last_rev = tree.branch.repository.get_revision(tree.last_revision())
556
559
        properties = last_rev.properties
557
 
        self.assertEqual(u'John D\xf6 <jdoe@example.com>', properties['author'])
 
560
        self.assertEqual(u'John D\xf6 <jdoe@example.com>', properties['authors'])
558
561
 
559
562
    def test_author_no_email(self):
560
563
        """Author's name without an email address is allowed, too."""
565
568
                                "tree/hello.txt")
566
569
        last_rev = tree.branch.repository.get_revision(tree.last_revision())
567
570
        properties = last_rev.properties
568
 
        self.assertEqual('John Doe', properties['author'])
 
571
        self.assertEqual('John Doe', properties['authors'])
 
572
 
 
573
    def test_multiple_authors(self):
 
574
        """Multiple authors can be specyfied, and all are stored."""
 
575
        tree = self.make_branch_and_tree('tree')
 
576
        self.build_tree(['tree/hello.txt'])
 
577
        tree.add('hello.txt')
 
578
        out, err = self.run_bzr("commit -m hello --author='John Doe' "
 
579
                                "--author='Jane Rey' tree/hello.txt")
 
580
        last_rev = tree.branch.repository.get_revision(tree.last_revision())
 
581
        properties = last_rev.properties
 
582
        self.assertEqual('John Doe\nJane Rey', properties['authors'])
569
583
 
570
584
    def test_partial_commit_with_renames_in_tree(self):
571
585
        # this test illustrates bug #140419