~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Aaron Bentley
  • Date: 2007-09-17 12:46:56 UTC
  • mfrom: (2825 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2826.
  • Revision ID: abentley@panoramicfeedback.com-20070917124656-j3hhxhx9igy11mfc
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
    
123
123
    def has_filename(self, filename):
124
124
        """True if the tree has given filename."""
125
 
        raise NotImplementedError()
 
125
        raise NotImplementedError(self.has_filename)
126
126
 
127
127
    def has_id(self, file_id):
128
128
        file_id = osutils.safe_file_id(file_id)
228
228
        raise NotImplementedError(self.get_file_mtime)
229
229
 
230
230
    def get_file_by_path(self, path):
231
 
        return self.get_file(self._inventory.path2id(path))
 
231
        return self.get_file(self._inventory.path2id(path), path)
232
232
 
233
233
    def iter_files_bytes(self, desired_files):
234
234
        """Iterate through file contents.
267
267
        raise NotImplementedError(self.get_symlink_target)
268
268
 
269
269
    def annotate_iter(self, file_id):
270
 
        """Return an iterator of revision_id, line tuples
 
270
        """Return an iterator of revision_id, line tuples.
271
271
 
272
272
        For working trees (and mutable trees in general), the special
273
273
        revision_id 'current:' will be used for lines that are new in this
277
277
        raise NotImplementedError(self.annotate_iter)
278
278
 
279
279
    def plan_file_merge(self, file_id, other):
280
 
        """Generate a merge plan based on annotations
 
280
        """Generate a merge plan based on annotations.
281
281
 
282
282
        If the file contains uncommitted changes in this tree, they will be
283
283
        attributed to the 'current:' pseudo-revision.  If the file contains
323
323
    def paths2ids(self, paths, trees=[], require_versioned=True):
324
324
        """Return all the ids that can be reached by walking from paths.
325
325
        
326
 
        Each path is looked up in each this tree and any extras provided in
 
326
        Each path is looked up in this tree and any extras provided in
327
327
        trees, and this is repeated recursively: the children in an extra tree
328
328
        of a directory that has been renamed under a provided path in this tree
329
 
        are all returned, even if none exist until a provided path in this
 
329
        are all returned, even if none exist under a provided path in this
330
330
        tree, and vice versa.
331
331
 
332
332
        :param paths: An iterable of paths to start converting to ids from.
405
405
           versioned_kind.
406
406
         - lstat is the stat data *if* the file was statted.
407
407
         - path_from_tree_root is the path from the root of the tree.
408
 
         - file_id is the file_id is the entry is versioned.
 
408
         - file_id is the file_id if the entry is versioned.
409
409
         - versioned_kind is the kind of the file as last recorded in the 
410
410
           versioning system. If 'unknown' the file is not versioned.
411
411
        One of 'kind' and 'versioned_kind' must not be 'unknown'.
545
545
    :param trees: The trees to find file_ids within
546
546
    :param require_versioned: if true, all specified filenames must occur in
547
547
        at least one tree.
548
 
    :return: a set of (path, file ids) for the specified filenames
 
548
    :return: a set of file ids for the specified filenames
549
549
    """
550
550
    not_versioned = []
551
551
    interesting_ids = set()
564
564
 
565
565
 
566
566
def _find_children_across_trees(specified_ids, trees):
567
 
    """Return a set including specified ids and their children
 
567
    """Return a set including specified ids and their children.
568
568
    
569
569
    All matches in all trees will be used.
570
570
 
596
596
    Its instances have methods like 'compare' and contain references to the
597
597
    source and target trees these operations are to be carried out on.
598
598
 
599
 
    clients of bzrlib should not need to use InterTree directly, rather they
 
599
    Clients of bzrlib should not need to use InterTree directly, rather they
600
600
    should use the convenience methods on Tree such as 'Tree.compare()' which
601
601
    will pass through to InterTree as appropriate.
602
602
    """