Locking files
What is lock in Timeline
If you work in a team environment, you may end up in a situation where you start editing a file and then realise that someone else in your team has also edited the same file and submitted their changes into Subversion. When this happens, you will need to choose whose version of the file (yours or the other person's) is better and should be considered as the correct version.
To prevent this situation you can use the "lock" function in Timeline. When you start editing a file, you can press the "lock" button at the bottom of the Timeline window to lock the file. After you have locked the file, any other user who opens this file will see a "red lock" icon in the Timeline window indicating that someone else is working on this file. If the other user ignores the red icon, makes some modifications and then tries to submit their changes, Timeline will reject their changes and show the following message:
This file is locked by _username_
If you want to submit your changes you may break the lock, however this may mean that _username_ may lose their changes.
Lock button
Lock button can be found at the bottom of the Timeline window - it is the last button on the button panel. The button has 3 state:
Default (unlocked): this state indicates that the current file is unlocked. You can press the button to lock the file
If you move your mouse over the button in this state you will see an advice in the tooltip window.
Green (locked): this state indicates that the current file is locked by you
If you move your mouse over the button in this state you will see the time when you locked the file in the tooltip window.
Red (locked by somebody else): this state indicates that the file is locked by somebody else
If you move your mouse over the button in this state you will see the name of the user who locked the file and the time when it was locked in the tooltip window.
Locking files
If a file is not locked, you can lock it by pressing the Lock button. When you lock a file Timeline marks this file as locked in the repository.
If someone else opens this file when it's locked, they will see the red lock icon. If you have not enabled auto-unlocking, the file will remain locked until you explicitly unlock it by pressing the lock button once again. Having the file locked prevents other users from modifying this file, so you should try to unlock the file as soon as you have finished working with it.
Unlocking files
You can unlock a file that you have locked by pressing the Lock button. When you unlock a file Timeline marks this file as unlocked in the repository.
Breaking the lock
If you open a file locked by someone else you will not be able to submit your changes to this file while it remains locked.
However, if you know that the person who locked the file has finished and submitted their changes and just forgot to unlock the file, you may "break the lock" by pressing the red lock icon. After you break the lock the file becomes unlocked, so you can either lock it or submit your changes without locking it. Please not: breaking the lock is an emergency solution, and we strongly recommend you to make sure that the person who holds the lock has actually finished working with the file, so please contact the lock holder before breaking the lock.
Auto-locking
You can configure Timeline to automatically lock files when you start working with them in Photoshop. To do so, please open Timeline settings from the Timeline menu. Select the "Locks" tab. In the "Automatically lock files" secion you will see the following options:
- Never: This means that Timeline will not attempt to lock files automatically. This is the default option.
- When you open a file: if you select this option, Timeline will attemt to lock files when you open them in Photoshop. Please note: if you open a file that is locked by someone else, Timeline will just display the "red lock" icon as usually and it will not show you a warning message to avoid annoying you.
- When you save a file: if you select this option Timeline will attempt to lock files when you save them in Photoshop for the first time. This option is useful if you often open files without modifying them.
Auto-unlocking
You can configure Timeline to automatically unlock files when you close them in Photoshop. To do so, please open timeline settings from the Timeline menu. Select the "Locks" tab. In the "Automatically unlock files" secion you will see the following options:
- Never: if you select this option Timeline will not automatically unlock files. You will need to unlock files explicitly by pressing the "Lock" button when you have finished your modifications. This is the default option.
- When you close a file without any unsubmitted modifications: if you select this option Timeline will automatically unlock files without any unsubmitted modifications when you close them in Photoshop. "Files without any unsubmitted modifications" means that all the changes that you have made to a file have been submitted to Subversion. Visually it means that there is no red unsubmitted version in the Timeline window.
- When you close a file: if you select this option Timeline will automatically unlock files when you close them in Photoshop.
