~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

  • Committer: Martin von Gagern
  • Date: 2011-06-01 12:53:56 UTC
  • mto: This revision was merged to the branch mainline in revision 6009.
  • Revision ID: martin.vgagern@gmx.net-20110601125356-lwozv2vecea6hxfz
Change from no_decorate to classify as name for the argument.

The command line switch remains as --no-classify, to keep backwards
compatibility.  Users are free to include --no-classify in an alias, and
still use --classify to change back.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
 
73
73
        super(LocalTransport, self).__init__(base)
74
74
        self._local_base = urlutils.local_path_from_url(base)
75
 
        if self._local_base[-1] != '/':
76
 
            self._local_base = self._local_base + '/'
77
75
 
78
76
    def clone(self, offset=None):
79
77
        """Return a new LocalTransport with root at self.base + offset
329
327
 
330
328
    def open_write_stream(self, relpath, mode=None):
331
329
        """See Transport.open_write_stream."""
 
330
        # initialise the file
 
331
        self.put_bytes_non_atomic(relpath, "", mode=mode)
332
332
        abspath = self._abspath(relpath)
333
 
        try:
334
 
            handle = osutils.open_file(abspath, 'wb')
335
 
        except (IOError, OSError),e:
336
 
            self._translate_error(e, abspath)
337
 
        handle.truncate()
 
333
        handle = osutils.open_file(abspath, 'wb')
338
334
        if mode is not None:
339
335
            self._check_mode_and_size(abspath, handle.fileno(), mode)
340
336
        transport._file_streams[self.abspath(relpath)] = handle