/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/bundle/bundle_data.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-17 16:47:30 UTC
  • mto: This revision was merged to the branch mainline in revision 6470.
  • Revision ID: jelmer@samba.org-20120217164730-tn0pz8ptok0oewpl
UseĀ treeĀ API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
687
687
        if new_path not in self.patches:
688
688
            # If the entry does not have a patch, then the
689
689
            # contents must be the same as in the base_tree
690
 
            ie = self.base_tree.root_inventory[file_id]
691
 
            if ie.text_size is None:
692
 
                return ie.text_size, ie.text_sha1
693
 
            return int(ie.text_size), ie.text_sha1
 
690
            text_size = self.base_tree.get_file_size(file_id)
 
691
            text_sha1 = self.base_tree.get_file_sha1(file_id)
 
692
            return text_size, text_sha1
694
693
        fileobj = self.get_file(file_id)
695
694
        content = fileobj.read()
696
695
        return len(content), sha_string(content)
701
700
        This need to be called before ever accessing self.inventory
702
701
        """
703
702
        from os.path import dirname, basename
704
 
        base_inv = self.base_tree.root_inventory
705
703
        inv = Inventory(None, self.revision_id)
706
704
 
707
705
        def add_entry(file_id):
750
748
 
751
749
    root_inventory = property(_get_inventory)
752
750
 
753
 
    def __iter__(self):
754
 
        for path, entry in self.inventory.iter_entries():
755
 
            yield entry.file_id
756
 
 
757
751
    def list_files(self, include_root=False, from_dir=None, recursive=True):
758
752
        # The only files returned by this are those from the version
759
753
        inv = self.inventory