Lunny Xiao a100ac3306 Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed (#31035)
Fix #28144 

To make the resources will be cleanup once failed. All repository
operations now follow a consistent pattern:

- 1. Create a database record for the repository with the status
being_migrated.
- 2. Register a deferred cleanup function to delete the repository and
its related data if the operation fails.
- 3.	Perform the actual Git and database operations step by step.
- 4. Upon successful completion, update the repository’s status to
ready.

The adopt operation is a special case — if it fails, the repository on
disk should not be deleted.
2025-04-07 22:12:54 -07:00
..
2025-04-01 10:14:01 +00:00
2025-02-20 12:39:21 -08:00
2025-04-01 10:14:01 +00:00
2025-03-31 01:53:48 -04:00
2025-04-08 04:15:15 +00:00
2025-04-08 04:15:15 +00:00
2025-04-08 04:15:15 +00:00
2025-04-01 10:14:01 +00:00
2025-03-31 01:53:48 -04:00
2025-04-08 04:15:15 +00:00
2025-03-31 01:53:48 -04:00
2025-03-31 01:53:48 -04:00
2024-12-30 14:35:46 -08:00