/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/repository_implementations/test_commit_builder.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-10-17 05:59:11 UTC
  • mfrom: (2903.2.11 commit)
  • Revision ID: pqm@pqm.ubuntu.com-20071017055911-jots6fwy20740n0i
commit produces (but does not yet use) a basis delta and avoids one iter_entries (mbp)

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
    
140
140
    def test_commit_unchanged_root(self):
141
141
        tree = self.make_branch_and_tree(".")
142
 
        tree.commit('')
 
142
        old_revision_id = tree.commit('')
143
143
        tree.lock_write()
144
144
        parent_tree = tree.basis_tree()
145
145
        parent_tree.lock_read()
152
152
                ie, [parent_tree.inventory], '', tree,
153
153
                tree.path_content_summary(''))
154
154
            self.assertFalse(version_recorded)
155
 
            self.assertEqual(None, delta)
 
155
            # if the repository format recorded a new root revision, that
 
156
            # should be in the delta
 
157
            got_new_revision = ie.revision != old_revision_id
 
158
            if got_new_revision:
 
159
                self.assertEqual(
 
160
                    ('', '', ie.file_id, ie),
 
161
                    delta)
 
162
            else:
 
163
                self.assertEqual(None, delta)
156
164
            builder.abort()
157
165
        except:
158
166
            builder.abort()