~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_foreign.py

  • Committer: Patch Queue Manager
  • Date: 2012-01-27 14:28:32 UTC
  • mfrom: (6445.2.6 avoid-inventory)
  • Revision ID: pqm@pqm.ubuntu.com-20120127142832-qcv2y1c3i0mbt9bl
(jelmer) Avoid the use of inventories in a few more places. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
                        rev.timezone, rev.committer, rev.properties,
206
206
                        new_revid)
207
207
                try:
208
 
                    for path, ie in tree.inventory.iter_entries():
 
208
                    parent_tree = self.target.repository.revision_tree(
 
209
                        parent_revid)
 
210
                    for path, ie in tree.iter_entries_by_dir():
209
211
                        new_ie = ie.copy()
210
212
                        new_ie.revision = None
211
213
                        builder.record_entry_contents(new_ie, 
212
 
                            [self.target.repository.revision_tree(parent_revid).inventory],
 
214
                            [parent_tree.inventory],
213
215
                            path, tree, 
214
216
                            (ie.kind, ie.text_size, ie.executable, ie.text_sha1))
215
217
                    builder.finish_inventory()
429
431
        foreign.update_workingtree_fileids(wt, target_basis)
430
432
        wt.lock_read()
431
433
        try:
432
 
            self.assertEquals(set([root_id, "bla-b"]), set(wt.inventory))
 
434
            self.assertEquals(set([root_id, "bla-b"]), set(wt.all_file_ids()))
433
435
        finally:
434
436
            wt.unlock()
435
437