~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/chroot.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-11-04 18:51:39 UTC
  • mfrom: (2961.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20071104185139-kaio3sneodg2kp71
Authentication ring implementation (read-only)

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
        self.backing_transport = backing_transport
46
46
 
47
47
    def _factory(self, url):
 
48
        assert url.startswith(self.scheme)
48
49
        return ChrootTransport(self, url)
49
50
 
50
51
    def get_url(self):
78
79
 
79
80
    def _safe_relpath(self, relpath):
80
81
        safe_relpath = self._combine_paths(self.base_path, relpath)
81
 
        if not safe_relpath.startswith('/'):
82
 
            raise ValueError(safe_relpath)
 
82
        assert safe_relpath.startswith('/')
83
83
        return safe_relpath[1:]
84
84
 
85
85
    # Transport methods
116
116
    def has(self, relpath):
117
117
        return self._call('has', relpath)
118
118
 
119
 
    def is_readonly(self):
120
 
        return self.server.backing_transport.is_readonly()
121
 
 
122
119
    def iter_files_recursive(self):
123
120
        backing_transport = self.server.backing_transport.clone(
124
121
            self._safe_relpath('.'))