~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_branch.py

  • Committer: Brad Crittenden
  • Date: 2007-02-26 20:56:10 UTC
  • mfrom: (2300 +trunk)
  • mto: (2293.1.5 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 2311.
  • Revision ID: brad.crittenden@canonical.com-20070226205610-44oatbxrjjz3ajwy
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
        self.assertEquals(br.revision_history(), ["rev1", "rev2", "rev3"])
96
96
        self.assertRaises(errors.ReservedId, br.append_revision, 'current:')
97
97
 
 
98
    def test_revision_ids_are_utf8(self):
 
99
        wt = self.make_branch_and_tree('tree')
 
100
        wt.commit('f', rev_id='rev1')
 
101
        wt.commit('f', rev_id='rev2')
 
102
        wt.commit('f', rev_id='rev3')
 
103
 
 
104
        br = self.get_branch()
 
105
        br.fetch(wt.branch)
 
106
        br.set_revision_history(['rev1', 'rev2', 'rev3'])
 
107
        rh = br.revision_history()
 
108
        self.assertEqual(['rev1', 'rev2', 'rev3'], rh)
 
109
        for revision_id in rh:
 
110
            self.assertIsInstance(revision_id, str)
 
111
        last = br.last_revision()
 
112
        self.assertEqual('rev3', last)
 
113
        self.assertIsInstance(last, str)
 
114
        revno, last = br.last_revision_info()
 
115
        self.assertEqual(3, revno)
 
116
        self.assertEqual('rev3', last)
 
117
        self.assertIsInstance(last, str)
 
118
 
98
119
    def test_fetch_revisions(self):
99
120
        """Test fetch-revision operation."""
100
121
        get_transport(self.get_url()).mkdir('b1')