/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-03 23:21:15 UTC
  • mfrom: (7290.42.6 paramiko-compat)
  • Revision ID: breezy.the.bot@gmail.com-20200203232115-g7k11bhsfeiqcprv
Fix compatibility with newer versions of paramiko, which break on noise before keys in pem files.

Merged from https://code.launchpad.net/~jelmer/brz/paramiko-compat/+merge/378480

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