/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

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,
1310
1306
                    key = (posixpath.dirname(path), path)
1311
1307
                    if key not in ret and self.is_versioned(path):
1312
1308
                        ret[key] = self._get_dir_ie(path, self.path2id(key[0]))
1313
 
            return ((path, ie) for ((_, path), ie) in sorted(viewitems(ret)))
 
1309
            return ((path, ie) for ((_, path), ie) in sorted(ret.items()))
1314
1310
 
1315
1311
    def iter_references(self):
1316
1312
        if self.supports_tree_reference():
1325
1321
                                posixpath.basename(path).strip("/"), parent_id)
1326
1322
 
1327
1323
    def _get_file_ie(self, name, path, value, parent_id):
1328
 
        if not isinstance(name, text_type):
 
1324
        if not isinstance(name, str):
1329
1325
            raise TypeError(name)
1330
 
        if not isinstance(path, text_type):
 
1326
        if not isinstance(path, str):
1331
1327
            raise TypeError(path)
1332
1328
        if not isinstance(value, tuple) or len(value) != 10:
1333
1329
            raise TypeError(value)