/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/transport/remote.py

  • Committer: Jelmer Vernooij
  • Date: 2020-07-05 12:50:01 UTC
  • mfrom: (7490.40.46 work)
  • mto: (7490.40.48 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200705125001-7s3vo0p55szbbws7
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
imported from breezy.bzr.smart.
21
21
"""
22
22
 
 
23
from __future__ import absolute_import
 
24
 
23
25
__all__ = ['RemoteTransport', 'RemoteTCPTransport', 'RemoteSSHTransport']
24
26
 
25
27
from io import BytesIO
35
37
from ..bzr import (
36
38
    remote,
37
39
    )
 
40
from ..sixish import PY3
38
41
from ..bzr.smart import client, medium
39
42
 
40
43
 
469
472
    def list_dir(self, relpath):
470
473
        resp = self._call2(b'list_dir', self._remote_path(relpath))
471
474
        if resp[0] == b'names':
472
 
            return [name.decode('utf-8') for name in resp[1:]]
 
475
            return [name.decode('utf-8') if PY3 else name for name in resp[1:]]
473
476
        raise errors.UnexpectedSmartServerResponse(resp)
474
477
 
475
478
    def iter_files_recursive(self):
476
479
        resp = self._call2(b'iter_files_recursive', self._remote_path(''))
477
480
        if resp[0] == b'names':
478
 
            return [name.decode('utf-8') for name in resp[1:]]
 
481
            return [name.decode('utf-8') if PY3 else name for name in resp[1:]]
479
482
        raise errors.UnexpectedSmartServerResponse(resp)
480
483
 
481
484