~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/readonly.py

  • Committer: Vincent Ladeuil
  • Date: 2016-01-22 08:02:12 UTC
  • mfrom: (6612 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6613.
  • Revision ID: v.ladeuil+lp@free.fr-20160122080212-iz2fcz6n0su5px7g
Merge trunk resolving conflicts

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)]