~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_commit.py

  • Committer: Martin Pool
  • Date: 2005-09-16 09:39:57 UTC
  • Revision ID: mbp@sourcefrog.net-20050916093957-27ea539ac05c643a
- commit updates entry_version

- some tests check this works

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
        b.rename_one('hello', 'fruity')
138
138
        b.commit(message='renamed', rev_id='test@rev-2', allow_pointless=False)
139
139
 
 
140
        eq = self.assertEquals
140
141
        tree1 = b.revision_tree('test@rev-1')
141
 
        self.assertEquals(tree1.id2path('hello-id'), 'hello')
142
 
        self.assertEquals(tree1.get_file_text('hello-id'), 'contents of hello\n')
 
142
        eq(tree1.id2path('hello-id'), 'hello')
 
143
        eq(tree1.get_file_text('hello-id'), 'contents of hello\n')
143
144
        self.assertFalse(tree1.has_filename('fruity'))
144
145
        self.check_inventory_shape(tree1.inventory, ['hello'])
 
146
        ie = tree1.inventory['hello-id']
 
147
        eq(ie.entry_version, 'test@rev-1')
145
148
 
146
149
        tree2 = b.revision_tree('test@rev-2')
147
 
        self.assertEquals(tree2.id2path('hello-id'), 'fruity')
148
 
        self.assertEquals(tree2.get_file_text('hello-id'), 'contents of hello\n')
 
150
        eq(tree2.id2path('hello-id'), 'fruity')
 
151
        eq(tree2.get_file_text('hello-id'), 'contents of hello\n')
149
152
        self.check_inventory_shape(tree2.inventory, ['fruity'])
 
153
        ie = tree2.inventory['hello-id']
 
154
        eq(ie.entry_version, 'test@rev-2')
150
155
 
151
156
 
152
157
    def test_reused_rev_id(self):