/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: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

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
 
 
25
23
__all__ = ['RemoteTransport', 'RemoteTCPTransport', 'RemoteSSHTransport']
26
24
 
27
25
from io import BytesIO
37
35
from ..bzr import (
38
36
    remote,
39
37
    )
40
 
from ..sixish import PY3
41
38
from ..bzr.smart import client, medium
42
39
 
43
40
 
472
469
    def list_dir(self, relpath):
473
470
        resp = self._call2(b'list_dir', self._remote_path(relpath))
474
471
        if resp[0] == b'names':
475
 
            return [name.decode('utf-8') if PY3 else name for name in resp[1:]]
 
472
            return [name.decode('utf-8') for name in resp[1:]]
476
473
        raise errors.UnexpectedSmartServerResponse(resp)
477
474
 
478
475
    def iter_files_recursive(self):
479
476
        resp = self._call2(b'iter_files_recursive', self._remote_path(''))
480
477
        if resp[0] == b'names':
481
 
            return [name.decode('utf-8') if PY3 else name for name in resp[1:]]
 
478
            return [name.decode('utf-8') for name in resp[1:]]
482
479
        raise errors.UnexpectedSmartServerResponse(resp)
483
480
 
484
481
 
602
599
 
603
600
 
604
601
class HintingSSHTransport(transport.Transport):
605
 
    """Simple transport that handles ssh:// and points out bzr+ssh://."""
 
602
    """Simple transport that handles ssh:// and points out bzr+ssh:// and git+ssh://."""
 
603
 
 
604
    # TODO(jelmer): Implement support for detecting whether the repository at the
 
605
    # other end is a git or bzr repository.
606
606
 
607
607
    def __init__(self, url):
608
 
        raise errors.UnsupportedProtocol(url,
609
 
                                         'bzr supports bzr+ssh to operate over ssh, use "bzr+%s".' % url)
 
608
        raise errors.UnsupportedProtocol(
 
609
            url, 'Use bzr+ssh for Bazaar operations over SSH, e.g. "bzr+%s". '
 
610
            'Use git+ssh for Git operations over SSH, e.g. "git+%s".' % (url, url))
610
611
 
611
612
 
612
613
def get_test_permutations():