~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-08-15 13:49:38 UTC
  • mfrom: (6060.3.1 fix-last-revno-args)
  • Revision ID: pqm@pqm.ubuntu.com-20110815134938-4fuo63g4v2hj8jdt
(jelmer) Cope with the localhost having the name 'localhost' when running
 the test suite. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
327
327
 
328
328
    def open_write_stream(self, relpath, mode=None):
329
329
        """See Transport.open_write_stream."""
330
 
        # initialise the file
331
 
        self.put_bytes_non_atomic(relpath, "", mode=mode)
332
330
        abspath = self._abspath(relpath)
333
331
        handle = osutils.open_file(abspath, 'wb')
 
332
        handle.truncate()
334
333
        if mode is not None:
335
334
            self._check_mode_and_size(abspath, handle.fileno(), mode)
336
335
        transport._file_streams[self.abspath(relpath)] = handle