Making repository lock failure retryable