~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: 2006-04-20 02:28:21 UTC
  • mfrom: (1666.1.10 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060420022821-4337b8fa4942d8fe
Make knits the default format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
        except (IOError, OSError),e:
137
137
            self._translate_error(e, path)
138
138
 
139
 
    def append(self, relpath, f):
 
139
    def append(self, relpath, f, mode=None):
140
140
        """Append the text in the file-like object into the final
141
141
        location.
142
142
        """
143
143
        try:
144
144
            fp = open(self.abspath(relpath), 'ab')
 
145
            if mode is not None:
 
146
                os.chmod(self.abspath(relpath), mode)
145
147
        except (IOError, OSError),e:
146
148
            self._translate_error(e, relpath)
147
149
        # win32 workaround (tell on an unwritten file returns 0)