It can be useful for a team to establish specific times when merging is allowed/disallowed, such as during the weekends or holidays.
Merge Freeze allows you to add weekly recurring freezes by opening up the “Recurring freezes” panel of a protected branch (or via the API) and selecting the days and times for your recurring freezes.
If you add a recurring freeze and the current time is in the middle of it, then your branch will automatically freeze itself until the end of the recurring freeze.
Recurring freezes can be manually overridden at any time to push out urgent fixes etc.
If a recurring freeze is currently in place and you manually unfreeze it to push out an urgent fix and then refreeze it again, it will automatically unfreeze itself when the recurring freeze period ends.
The scheduler will skip an additional freezes/unfreezes if there already is a freeze/unfreeze in in place. The scheduler does not prioritize a one-off vs recurring schedule.
Example 1: You set a one-off freeze at 4:55pm and then a scheduled recurring freeze at 5p.
The scheduler will see at 5p that the branch is already frozen, and skip the second duplicative scheduled freeze.
In this case, the one-off freeze won't override a recurring freeze and you'd only see the branch log associated with the one-off freeze.
Example 2: You set a recurring daily unfreeze at 8am and refreeze at 4pm. Then, you add a one-time freeze for 5 days from Monday @ 4:01pm through Friday @ 8:01am.
The scheduler will see the branch is already frozen at 4:01pm on Monday and skip its process. The scheduler will run the daily unfreeze at 8am on Friday and skip the one-time unfreeze because it sees the branch is already unfrozen.