Configure lock rules
Configure the lock rules for exclusive checkouts.
Read time 2 minutesLast updated 21 days ago
Use one of the following methods to add or edit your Unity Version Control (UVCS) lock rules to configure your file locks:
- Manage your lock rules from the UVCS On-Prem server administration console.
- Create or edit your file.
lock.conf
Configure lock rules in the server administration console
- Launch the server administration console.
- Select Configuration > Lock rules.
- Add or edit global rules for all repositories, or repository specific rules to apply to specific repositories.
Add global rules
- Select Generate common rules.
- Either load the common lock rules or edit them to specify your own global rules.
- Select Apply.
Add repository specific rules
- Select Add to specify the rules for a repository.
- Enter the name fo the repository.
- Select Generate common rules and edit to specify your own rules.
- Select Delete to remove rules for a repository if you don't need them. Select Apply.
Configure lock rules in the lock.conf
file
Create or edit the lock.conflock.confrep:<repname> [br:[<destination_branch>]] [excluded_branches:<exclusion_pattern>…]
Parameters | Description |
|---|---|
| The name of the repository where that repository specific lock rules apply to. You can also use |
| The source of truth when you create a new lock. UVCS considers the revision in this branch as the last revision. Locked files in other branches are not released until you merge them back into the destination branch. The default destination branch is |
| A pattern of files to exclude from lock rules that might represent a full branch name, for example |
*.png/assets/texturesmodelbattlegamerep:battlegame br:/main*.png/assets/textures/model*.*
Example lock.conf
file
lock.confrep: * br:/main# Audio and video formats*.mkv*.mp3*.mp4*.ogg*.wav*.wave# Image formats*.bmp*.jpg*.jpeg*.png*.gif*.eps*.exif*.icns*.ico*.psd*.ai*.svg*.pcxrep: doom3src br:/main excluded_branches: /main/experiment /main/experiments/* */art-concept */art-concepts/***/sys/*.xlib*.def
Example lock rules for specific cases
You can use lock rules to lock files or a directory in a specific folder. For examples for how to use these types of lock, refer to the following:Rule | Description |
|---|---|
| Lock everything under the |
| Lock everything under the |
| Never lock the |
| Lock every file that ends with |