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

  • Committer: Jelmer Vernooij
  • Date: 2020-02-07 02:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 7492.
  • Revision ID: jelmer@jelmer.uk-20200207021430-m49iq3x4x8xlib6x
Drop python2 support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    CURRENT_REVISION,
67
67
    NULL_REVISION,
68
68
    )
69
 
from ..sixish import (
70
 
    text_type,
71
 
    viewitems,
72
 
    )
73
69
 
74
70
from .mapping import (
75
71
    mode_is_executable,
1266
1262
                    key = (posixpath.dirname(path), path)
1267
1263
                    if key not in ret and self.is_versioned(path):
1268
1264
                        ret[key] = self._get_dir_ie(path, self.path2id(key[0]))
1269
 
            return ((path, ie) for ((_, path), ie) in sorted(viewitems(ret)))
 
1265
            return ((path, ie) for ((_, path), ie) in sorted(ret.items()))
1270
1266
 
1271
1267
    def iter_references(self):
1272
1268
        if self.supports_tree_reference():
1281
1277
                                posixpath.basename(path).strip("/"), parent_id)
1282
1278
 
1283
1279
    def _get_file_ie(self, name, path, value, parent_id):
1284
 
        if not isinstance(name, text_type):
 
1280
        if not isinstance(name, str):
1285
1281
            raise TypeError(name)
1286
 
        if not isinstance(path, text_type):
 
1282
        if not isinstance(path, str):
1287
1283
            raise TypeError(path)
1288
1284
        if not isinstance(value, tuple) or len(value) != 10:
1289
1285
            raise TypeError(value)