/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 breezy/tree.py

  • Committer: Jelmer Vernooij
  • Date: 2019-08-11 13:33:45 UTC
  • mfrom: (7379 work)
  • mto: This revision was merged to the branch mainline in revision 7389.
  • Revision ID: jelmer@jelmer.uk-20190811133345-dp9j3c569vxj4l9y
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        self.path = path
62
62
 
63
63
 
 
64
class MissingNestedTree(errors.BzrError):
 
65
 
 
66
    _fmt = "The nested tree for %(path)s can not be resolved."""
 
67
 
 
68
    def __init__(self, path):
 
69
        self.path = path
 
70
 
 
71
 
64
72
class TreeEntry(object):
65
73
    """An entry that implements the minimum interface used by commands.
66
74
    """
357
365
                if entry.kind == 'tree-reference':
358
366
                    yield path
359
367
 
 
368
    def get_nested_tree(self, path):
 
369
        """Open the nested tree at the specified path.
 
370
 
 
371
        :param path: Path from which to resolve tree reference.
 
372
        :return: A Tree object for the nested tree
 
373
        :raise MissingNestedTree: If the nested tree can not be resolved
 
374
        """
 
375
        raise NotImplementedError(self.get_nested_tree)
 
376
 
360
377
    def kind(self, path):
361
378
        raise NotImplementedError("Tree subclass %s must implement kind"
362
379
                                  % self.__class__.__name__)
520
537
        """
521
538
        raise NotImplementedError(self.get_symlink_target)
522
539
 
523
 
    def get_root_id(self):
524
 
        """Return the file_id for the root of this tree."""
525
 
        raise NotImplementedError(self.get_root_id)
526
 
 
527
540
    def annotate_iter(self, path,
528
541
                      default_revision=_mod_revision.CURRENT_REVISION):
529
542
        """Return an iterator of revision_id, line tuples.