~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Aaron Bentley
  • Date: 2007-01-12 04:48:18 UTC
  • mto: (2255.6.1 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: aaron.bentley@utoronto.ca-20070112044818-nnw6iunriqq073qc
Implement tree comparison for tree references

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
    def kind(self, file_id):
155
155
        raise NotImplementedError("subclasses must implement kind")
156
156
 
 
157
    def get_reference_revision(self, entry, path=None):
 
158
        raise NotImplementedError("subclasses must implement "
 
159
                                  "get_reference_revision")
 
160
 
157
161
    def _comparison_data(self, entry, path):
158
162
        """Return a tuple of kind, executable, stat_value for a file.
159
163
 
527
531
                if (from_tree.get_symlink_target(file_id) != 
528
532
                    to_tree.get_symlink_target(file_id)):
529
533
                    changed_content = True
 
534
            elif from_kind == 'tree-reference':
 
535
                if (from_tree.get_reference_revision(file_id, from_path) != 
 
536
                    to_tree.get_reference_revision(file_id, to_path)):
 
537
                    changed_content = True 
530
538
            parent = (from_parent, to_entry.parent_id)
531
539
            name = (from_name, to_entry.name)
532
540
            executable = (from_executable, to_executable)