/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/mutabletree.py

  • Committer: Jelmer Vernooij
  • Date: 2020-03-22 20:02:36 UTC
  • mto: (7490.7.7 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200322200236-fsbl91ktcn6fcbdd
Fix tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
See MutableTree for more details.
20
20
"""
21
21
 
 
22
from __future__ import absolute_import
 
23
 
22
24
from . import (
23
25
    errors,
24
26
    hooks,
27
29
    tree,
28
30
    )
29
31
 
 
32
from .sixish import (
 
33
    text_type,
 
34
    )
30
35
 
31
36
 
32
37
class BadReferenceTarget(errors.InternalBzrError):
96
101
 
97
102
        TODO: Perhaps callback with the ids and paths as they're added.
98
103
        """
99
 
        if isinstance(files, str):
 
104
        if isinstance(files, (str, text_type)):
100
105
            # XXX: Passing a single string is inconsistent and should be
101
106
            # deprecated.
102
107
            if not (ids is None or isinstance(ids, bytes)):
103
108
                raise AssertionError()
104
 
            if not (kinds is None or isinstance(kinds, str)):
 
109
            if not (kinds is None or isinstance(kinds, (str, text_type))):
105
110
                raise AssertionError()
106
111
            files = [files]
107
112
            if ids is not None:
401
406
        """
402
407
        raise NotImplementedError(self.copy_one)
403
408
 
404
 
    def transform(self, pb=None):
 
409
    def get_transform(self, pb=None):
405
410
        """Return a transform object for use with this tree."""
406
 
        raise NotImplementedError(self.transform)
 
411
        raise NotImplementedError(self.get_transform)
407
412
 
408
413
 
409
414
class MutableTreeHooks(hooks.Hooks):