~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

[merge] jam-integration 1512, includes Storage changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
232
232
        :return: A lock object, which should be passed to Transport.unlock()
233
233
        """
234
234
        from bzrlib.lock import ReadLock
235
 
        return ReadLock(self.abspath(relpath))
 
235
        path = relpath
 
236
        try:
 
237
            path = self.abspath(relpath)
 
238
            return ReadLock(path)
 
239
        except (IOError, OSError), e:
 
240
            self._translate_error(e, path)
236
241
 
237
242
    def lock_write(self, relpath):
238
243
        """Lock the given file for exclusive (write) access.