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

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
        else:
103
103
            return temp_t.base[:-1]
104
104
 
105
 
    def append(self, relpath, f, mode=None):
106
 
        """See Transport.append()."""
 
105
    def append_file(self, relpath, f, mode=None):
 
106
        """See Transport.append_file()."""
107
107
        _abspath = self._abspath(relpath)
108
108
        self._check_parent(_abspath)
109
109
        orig_content, orig_mode = self._files.get(_abspath, ("", None))
121
121
    def has(self, relpath):
122
122
        """See Transport.has()."""
123
123
        _abspath = self._abspath(relpath)
124
 
        return _abspath in self._files or _abspath in self._dirs
 
124
        return (_abspath in self._files) or (_abspath in self._dirs)
125
125
 
126
126
    def delete(self, relpath):
127
127
        """See Transport.delete()."""
137
137
            raise NoSuchFile(relpath)
138
138
        return StringIO(self._files[_abspath][0])
139
139
 
140
 
    def put(self, relpath, f, mode=None):
141
 
        """See Transport.put()."""
 
140
    def put_file(self, relpath, f, mode=None):
 
141
        """See Transport.put_file()."""
142
142
        _abspath = self._abspath(relpath)
143
143
        self._check_parent(_abspath)
144
144
        self._files[_abspath] = (f.read(), mode)