~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-11-17 03:20:35 UTC
  • mfrom: (4792.4.3 456036)
  • Revision ID: pqm@pqm.ubuntu.com-20091117032035-s3sgtlixj1lrminn
(Gordon Tyler) Fix IndexError during 'bzr ignore /' (#456036)

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
                              'modified hello\.txt\n'
108
108
                              'Committed revision 2\.\n$')
109
109
 
110
 
    def test_warn_about_forgotten_commit_message(self):
111
 
        """Test that the lack of -m parameter is caught"""
112
 
        wt = self.make_branch_and_tree('.')
113
 
        self.build_tree(['one', 'two'])
114
 
        wt.add(['two'])
115
 
        out, err = self.run_bzr('commit -m one two')
116
 
        self.assertContainsRe(err, "The commit message is a file name")
117
 
 
118
110
    def test_verbose_commit_renamed(self):
119
111
        # Verbose commit of renamed file should say so
120
112
        wt = self.prepare_simple_history()
616
608
        properties = last_rev.properties
617
609
        self.assertEqual('John Doe\nJane Rey', properties['authors'])
618
610
 
619
 
    def test_commit_time(self):
620
 
        tree = self.make_branch_and_tree('tree')
621
 
        self.build_tree(['tree/hello.txt'])
622
 
        tree.add('hello.txt')
623
 
        out, err = self.run_bzr("commit -m hello "
624
 
            "--commit-time='2009-10-10 08:00:00 +0100' tree/hello.txt")
625
 
        last_rev = tree.branch.repository.get_revision(tree.last_revision())
626
 
        self.assertEqual(
627
 
            'Sat 2009-10-10 08:00:00 +0100',
628
 
            osutils.format_date(last_rev.timestamp, last_rev.timezone))
629
 
        
630
 
    def test_commit_time_bad_time(self):
631
 
        tree = self.make_branch_and_tree('tree')
632
 
        self.build_tree(['tree/hello.txt'])
633
 
        tree.add('hello.txt')
634
 
        out, err = self.run_bzr("commit -m hello "
635
 
            "--commit-time='NOT A TIME' tree/hello.txt", retcode=3)
636
 
        self.assertStartsWith(
637
 
            err, "bzr: ERROR: Could not parse --commit-time:")
638
 
 
639
611
    def test_partial_commit_with_renames_in_tree(self):
640
612
        # this test illustrates bug #140419
641
613
        t = self.make_branch_and_tree('.')