Commit 226c2242 authored by Paco Guzman's avatar Paco Guzman

Rescue Rugged::OSError (lock exists) when creating references.

parent 08c8b974
......@@ -17,6 +17,7 @@ v 8.11.0 (unreleased)
v 8.10.2 (unreleased)
- User can now search branches by name. !5144
- Fix backup restore. !5459
- Rescue Rugged::OSError (lock exists) when creating references. !5497
- Disable MySQL foreign key checks before dropping all tables. !5472
- Use project ID in repository cache to prevent stale data from persisting across projects. !5460
- Ensure relative paths for video are rewritten as we do for images. !5474
......
......@@ -211,6 +211,9 @@ class Repository
rugged.references.create(keep_around_ref_name(sha), sha, force: true)
rescue Rugged::ReferenceError => ex
Rails.logger.error "Unable to create keep-around reference for repository #{path}: #{ex}"
rescue Rugged::OSError => ex
raise unless ex.message =~ /Failed to create locked file/ && ex.message =~ /File exists/
Rails.logger.error "Unable to create keep-around reference for repository #{path}: #{ex}"
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment