~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

 * The internal storage of history, and logical branch identity have now
   been split into Branch, and Repository. The common locking and file 
   management routines are now in bzrlib.lockablefiles. 
   (Aaron Bentley, Robert Collins, Martin Pool)

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.