/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-07-07 17:22:07 UTC
  • mfrom: (7363 work)
  • mto: This revision was merged to the branch mainline in revision 7378.
  • Revision ID: jelmer@jelmer.uk-20190707172207-nnugeuwvxsxo62wa
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
    """
349
357
                if entry.kind == 'tree-reference':
350
358
                    yield path
351
359
 
 
360
    def get_nested_tree(self, path):
 
361
        """Open the nested tree at the specified path.
 
362
 
 
363
        :param path: Path from which to resolve tree reference.
 
364
        :return: A Tree object for the nested tree
 
365
        :raise MissingNestedTree: If the nested tree can not be resolved
 
366
        """
 
367
        raise NotImplementedError(self.get_nested_tree)
 
368
 
352
369
    def kind(self, path):
353
370
        raise NotImplementedError("Tree subclass %s must implement kind"
354
371
                                  % self.__class__.__name__)