~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/memory.py

  • Committer: Robert Collins
  • Date: 2006-04-19 23:32:08 UTC
  • mto: (1711.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1674.
  • Revision ID: robertc@robertcollins.net-20060419233208-2ed6906796994316
Make knit the default format.
Adjust affect tests to either have knit specific values or to be more generic,
as appropriate.
Disable all SFTP prefetching for known paramikos - direct readv support is now
a TODO.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
        else:
96
96
            return temp_t.base[:-1]
97
97
 
98
 
    def append(self, relpath, f):
 
98
    def append(self, relpath, f, mode=None):
99
99
        """See Transport.append()."""
100
100
        _abspath = self._abspath(relpath)
101
101
        self._check_parent(_abspath)
102
102
        orig_content, orig_mode = self._files.get(_abspath, ("", None))
103
 
        self._files[_abspath] = (orig_content + f.read(), orig_mode)
 
103
        if mode is None:
 
104
            mode = orig_mode
 
105
        self._files[_abspath] = (orig_content + f.read(), mode)
104
106
        return len(orig_content)
105
107
 
106
108
    def _check_parent(self, _abspath):