~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_repository/test_revision.py

  • Committer: Aaron Bentley
  • Date: 2008-12-03 04:23:21 UTC
  • mfrom: (3878 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3892.
  • Revision ID: aaron@aaronbentley.com-20081203042321-kr5k4mdhmdvl3553
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
                     condiment='orange\n  mint\n\tcandy',
32
32
                     empty='',
33
33
                     non_ascii=u'\xb5')
34
 
        wt.commit(message='initial null commit', 
 
34
        wt.commit(message='initial null commit',
35
35
                 revprops=props,
36
36
                 allow_pointless=True,
37
37
                 rev_id='test@user-1')
38
38
        rev = b.repository.get_revision('test@user-1')
39
39
        self.assertTrue('flavor' in rev.properties)
40
40
        self.assertEquals(rev.properties['flavor'], 'choc-mint')
41
 
        self.assertEquals([('branch-nick', 'Nicholas'), 
 
41
        self.assertEquals([('branch-nick', 'Nicholas'),
42
42
                           ('condiment', 'orange\n  mint\n\tcandy'),
43
43
                           ('empty', ''),
44
44
                           ('flavor', 'choc-mint'),
50
50
        wt = self.make_branch_and_tree('.')
51
51
        b = wt.branch
52
52
        self.assertRaises(ValueError,
53
 
                          wt.commit, 
 
53
                          wt.commit,
54
54
                          message='invalid',
55
55
                          revprops={'what a silly property': 'fine'})
56
56
        self.assertRaises(ValueError,
57
 
                          wt.commit, 
 
57
                          wt.commit,
58
58
                          message='invalid',
59
59
                          revprops=dict(number=13))
60
60
 
63
63
    """Test that revision attributes are correct."""
64
64
 
65
65
    def test_revision_accessors(self):
66
 
        """Make sure the values that come out of a revision are the 
 
66
        """Make sure the values that come out of a revision are the
67
67
        same as the ones that go in.
68
68
        """
69
69
        tree1 = self.make_branch_and_tree("br1")
91
91
                     verbose=True)
92
92
        rev_b = tree2.branch.repository.get_revision(
93
93
                            tree2.branch.last_revision())
94
 
        
 
94
 
95
95
        self.assertEqual(rev_a.message, rev_b.message)
96
96
        self.assertEqual(rev_a.timestamp, rev_b.timestamp)
97
97
        self.assertEqual(rev_a.timezone, rev_b.timezone)