~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/readonly.py

  • Committer: Patch Queue Manager
  • Date: 2016-04-21 04:10:52 UTC
  • mfrom: (6616.1.1 fix-en-user-guide)
  • Revision ID: pqm@pqm.ubuntu.com-20160421041052-clcye7ns1qcl2n7w
(richard-wilbur) Ensure build of English use guide always uses English text
 even when user's locale specifies a different language. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2009 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2009, 2010, 2011, 2016 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
41
41
        """Readonly transport decorators are invoked via 'readonly+'"""
42
42
        return 'readonly+'
43
43
 
 
44
    def rename(self, rel_from, rel_to):
 
45
        """See Transport.rename."""
 
46
        raise TransportNotPossible('readonly transport')
 
47
 
44
48
    def delete(self, relpath):
45
49
        """See Transport.delete()."""
46
50
        raise TransportNotPossible('readonly transport')
61
65
        """See Transport.mkdir()."""
62
66
        raise TransportNotPossible('readonly transport')
63
67
 
 
68
    def open_write_stream(self, relpath, mode=None):
 
69
        """See Transport.open_write_stream()."""
 
70
        raise TransportNotPossible('readonly transport')
 
71
 
64
72
    def is_readonly(self):
65
73
        """See Transport.is_readonly."""
66
74
        return True
74
82
        raise TransportNotPossible('readonly transport')
75
83
 
76
84
    def get_smart_client(self):
77
 
        raise NoSmartServer(self.base)
 
85
        raise NoSmartMedium(self)
78
86
 
79
87
    def get_smart_medium(self):
80
88
        raise NoSmartMedium(self)
83
91
def get_test_permutations():
84
92
    """Return the permutations to be used in testing."""
85
93
    from bzrlib.tests import test_server
86
 
    return [(ReadonlyTransportDecorator, test_server.ReadonlyServer),]
 
94
    return [(ReadonlyTransportDecorator, test_server.ReadonlyServer)]