~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_version_info.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        wt.commit('b', rev_id='r2')
43
43
 
44
44
        self.build_tree_contents([('branch/a', 'new contents\n')])
45
 
        wt.commit('a2', rev_id='r3')
 
45
        wt.commit(u'\xe52', rev_id='r3')
46
46
 
47
47
        return wt
48
48
 
77
77
        self.assertContainsRe(val, 'id: r2')
78
78
        self.assertContainsRe(val, 'message: b')
79
79
        self.assertContainsRe(val, 'id: r3')
80
 
        self.assertContainsRe(val, 'message: a2')
 
80
        self.assertContainsRe(val, 'message: \xc3\xa52') # utf8 encoding '\xe5'
81
81
 
82
82
    def test_rio_version(self):
83
83
        wt = self.create_branch()
120
120
        stanza = regen(include_revision_history=True)
121
121
        revision_stanza = get_one_stanza(stanza, 'revisions')
122
122
        self.assertEqual(['r1', 'r2', 'r3'], revision_stanza.get_all('id'))
123
 
        self.assertEqual(['a', 'b', 'a2'], revision_stanza.get_all('message'))
 
123
        self.assertEqual(['a', 'b', u'\xe52'], revision_stanza.get_all('message'))
124
124
        self.assertEqual(3, len(revision_stanza.get_all('date')))
125
125
 
126
126
        # a was modified, so it should show up modified again
195
195
 
196
196
        rev_info = [(rev, message) for rev, message, timestamp, timezone
197
197
                                   in tvi.revisions]
198
 
        self.assertEqual([('r1', 'a'), ('r2', 'b'), ('r3', 'a2')], rev_info)
 
198
        self.assertEqual([('r1', 'a'), ('r2', 'b'), ('r3', u'\xe52')], rev_info)
199
199
 
200
200
        # a was modified, so it should show up modified again
201
201
        self.build_tree(['branch/a', 'branch/c'])