~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Robert Collins
  • Date: 2007-03-06 12:28:18 UTC
  • mto: (2321.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: robertc@robertcollins.net-20070306122818-xk0lc3l01ecl6vbc
Get merge_nested finally working: change nested tree iterators to take file_ids, and ensure the right branch is connected to in the merge logic. May not be suitable for shared repositories yet.

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
        return self.inventory.iter_entries_by_dir(
178
178
            specific_file_ids=specific_file_ids)
179
179
 
180
 
    def iter_reference_entries(self):
 
180
    def iter_references(self):
181
181
        for path, entry in self.iter_entries_by_dir():
182
182
            if entry.kind == 'tree-reference':
183
 
                yield path, entry
 
183
                yield path, entry.file_id
184
184
 
185
185
    def kind(self, file_id):
186
186
        raise NotImplementedError("Tree subclass %s must implement kind"
187
187
            % self.__class__.__name__)
188
188
 
189
 
    def get_reference_revision(self, entry, path=None):
 
189
    def get_reference_revision(self, file_id, path=None):
190
190
        raise NotImplementedError("Tree subclass %s must implement "
191
191
                                  "get_reference_revision"
192
192
            % self.__class__.__name__)
705
705
                    self.target.get_symlink_target(file_id)):
706
706
                    changed_content = True
707
707
                elif from_kind == 'tree-reference':
708
 
                    if (self.source.get_reference_revision(from_entry, from_path)
709
 
                        != self.target.get_reference_revision(to_entry, to_path)):
 
708
                    if (self.source.get_reference_revision(file_id, from_path)
 
709
                        != self.target.get_reference_revision(file_id, to_path)):
710
710
                        changed_content = True 
711
711
            parent = (from_parent, to_entry.parent_id)
712
712
            name = (from_name, to_entry.name)