/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/test_revisionnamespaces.py

Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
    def assertInHistoryIs(self, exp_revno, exp_revision_id, revision_spec):
68
68
        rev_info = self.get_in_history(revision_spec)
69
69
        self.assertEqual(exp_revno, rev_info.revno,
70
 
                         'Revision spec: %s returned wrong revno: %s != %s'
 
70
                         'Revision spec: %r returned wrong revno: %r != %r'
71
71
                         % (revision_spec, exp_revno, rev_info.revno))
72
72
        self.assertEqual(exp_revision_id, rev_info.rev_id,
73
 
                         'Revision spec: %s returned wrong revision id:'
74
 
                         ' %s != %s'
 
73
                         'Revision spec: %r returned wrong revision id:'
 
74
                         ' %r != %r'
75
75
                         % (revision_spec, exp_revision_id, rev_info.rev_id))
76
76
 
77
77
    def assertInvalid(self, revision_spec, extra=''):
277
277
                                          revision_id='alt_r3')
278
278
        self.assertInHistoryIs(None, 'alt_r3', 'revid:alt_r3')
279
279
 
 
280
    def test_unicode(self):
 
281
        """We correctly convert a unicode ui string to an encoded revid."""
 
282
        revision_id = u'\N{SNOWMAN}'.encode('utf-8')
 
283
        self.tree.commit('unicode', rev_id=revision_id)
 
284
        self.assertInHistoryIs(3, revision_id, u'revid:\N{SNOWMAN}')
 
285
        self.assertInHistoryIs(3, revision_id, 'revid:' + revision_id)
 
286
 
280
287
 
281
288
class TestRevisionSpec_last(TestRevisionSpec):
282
289