~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

  • Committer: Martin Pool
  • Date: 2006-01-30 06:23:50 UTC
  • mfrom: (1534.1.17 integration)
  • Revision ID: mbp@sourcefrog.net-20060130062350-d6f25277ddcdfd79
[merge] robert's integration of much recent work

Show diffs side-by-side

added added

removed removed

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