~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Alexander Belchenko
  • Date: 2008-02-06 15:33:12 UTC
  • mto: This revision was merged to the branch mainline in revision 3231.
  • Revision ID: bialix@ukr.net-20080206153312-qycs7u05d7fjtwqq
Ian's review

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
            want_unversioned=want_unversioned,
94
94
            )
95
95
 
96
 
    @symbol_versioning.deprecated_method(symbol_versioning.one_three)
97
 
    def _iter_changes(self, *args, **kwargs):
98
 
        return self.iter_changes(*args, **kwargs)
99
 
 
100
 
    def iter_changes(self, from_tree, include_unchanged=False,
 
96
    def _iter_changes(self, from_tree, include_unchanged=False,
101
97
                     specific_files=None, pb=None, extra_trees=None,
102
98
                     require_versioned=True, want_unversioned=False):
103
99
        intertree = InterTree.get(from_tree, self)
104
 
        return intertree.iter_changes(include_unchanged, specific_files, pb,
 
100
        return intertree._iter_changes(include_unchanged, specific_files, pb,
105
101
            extra_trees, require_versioned, want_unversioned=want_unversioned)
106
102
    
107
103
    def conflicts(self):
149
145
    def __iter__(self):
150
146
        return iter(self.inventory)
151
147
 
152
 
    def all_file_ids(self):
153
 
        """Iterate through all file ids, including ids for missing files."""
154
 
        return set(self.inventory)
155
 
 
156
148
    def id2path(self, file_id):
157
149
        """Return the path for a file id.
158
150
 
193
185
        raise NotImplementedError("Tree subclass %s must implement kind"
194
186
            % self.__class__.__name__)
195
187
 
196
 
    def stored_kind(self, file_id):
197
 
        """File kind stored for this file_id.
198
 
 
199
 
        May not match kind on disk for working trees.  Always available
200
 
        for versioned files, even when the file itself is missing.
201
 
        """
202
 
        return self.kind(file_id)
203
 
 
204
188
    def path_content_summary(self, path):
205
189
        """Get a summary of the information about path.
206
190
        
297
281
        """Return the file_id for the root of this tree."""
298
282
        raise NotImplementedError(self.get_root_id)
299
283
 
300
 
    def annotate_iter(self, file_id,
301
 
                      default_revision=_mod_revision.CURRENT_REVISION):
 
284
    def annotate_iter(self, file_id):
302
285
        """Return an iterator of revision_id, line tuples.
303
286
 
304
287
        For working trees (and mutable trees in general), the special
305
288
        revision_id 'current:' will be used for lines that are new in this
306
289
        tree, e.g. uncommitted changes.
307
290
        :param file_id: The file to produce an annotated version from
308
 
        :param default_revision: For lines that don't match a basis, mark them
309
 
            with this revision id. Not all implementations will make use of
310
 
            this value.
311
291
        """
312
292
        raise NotImplementedError(self.annotate_iter)
313
293
 
726
706
            require_versioned=require_versioned,
727
707
            want_unversioned=want_unversioned)
728
708
 
729
 
    def iter_changes(self, include_unchanged=False,
 
709
    def _iter_changes(self, include_unchanged=False,
730
710
                      specific_files=None, pb=None, extra_trees=[],
731
711
                      require_versioned=True, want_unversioned=False):
732
712
        """Generate an iterator of changes between trees.