/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 breezy/tests/test_bundle.py

  • Committer: Jelmer Vernooij
  • Date: 2017-12-03 22:21:17 UTC
  • mfrom: (6825.5.2 all-paths)
  • Revision ID: jelmer@jelmer.uk-20171203222117-strqpyuxkux0oomt
Merge lp:~jelmer/brz/all-paths.

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
    def all_file_ids(self):
91
91
        return set(self.paths.keys())
92
92
 
 
93
    def all_versioned_paths(self):
 
94
        return set(self.paths.values())
 
95
 
93
96
    def is_executable(self, path, file_id):
94
97
        # Not all the files are executable.
95
98
        return False
529
532
                                 % (ancestor,))
530
533
 
531
534
                # Now check that the file contents are all correct
532
 
                for inventory_id in old.all_file_ids():
 
535
                for path in old.all_versioned_paths():
533
536
                    try:
534
 
                        old_file = old.get_file(old.id2path(inventory_id))
 
537
                        old_file = old.get_file(path)
535
538
                    except errors.NoSuchFile:
536
539
                        continue
537
 
                    if old_file is None:
538
 
                        continue
539
540
                    self.assertEqual(
540
 
                            old_file.read(),
541
 
                            new.get_file(new.id2path(inventory_id)).read())
 
541
                            old_file.read(), new.get_file(path).read())
542
542
            finally:
543
543
                new.unlock()
544
544
                old.unlock()