Holding files
Some files cannot be combined: a model, a map, an image, a sound. When two people change one at the same time, one of them has to throw their version away. So a file like that is held by the piece of work that changes it, and while it is held, no other work can ship a change to it.
Most of the time there is nothing to type. save holds the files your work changes that cannot be combined, once the work is backed up, and says so. ship gives them back. saturn who shows what is held, and for which work.
Claim a file before starting on it
Section titled “Claim a file before starting on it”A save comes after the work is done. The window does not wait for one: it claims a file like that the moment it is changed. To claim one yourself:
saturn lock assets/Jar.rbxmlocktakes files, or a folder, which means every file in it that cannot be combined. Several are taken together or not at all.- It refuses when other work holds the file. It also refuses when a teammate has shipped a newer version than the one in your folder, since work begun on an old version could never be combined with the new one:
saturn savefirst, then lock. - The file is held by the piece of work, not by the person. A second piece of work of your own, or an agent working for you in another folder, cannot take it either, because the two would clash when they ship.
- A teammate who changes a held file can still
save, so nothing goes without a backup.saveandwhosay who holds it, andshipstops until the file is free. - Without a connection,
savesays which files it could not hold. The next save that reaches GitHub holds them.
Let a file go
Section titled “Let a file go”saturn unlock assets/Jar.rbxmThis lets go before the work ships. On a file that other work holds, it shows who holds it, for what, since when, and when that work was last saved, and asks first. When nobody is there to answer, it prints the command that goes ahead, such as saturn unlock 4ab22cb --yes. The id names that exact lock, so nothing is let go if the file changes hands in the meantime. Afterwards nobody holds the file.
A lock also follows its work. Once the work on GitHub no longer changes the file, because its pull request was merged, its branch was deleted, or the change was taken back out, the lock is cleared away by the next save, ship or lock that anyone runs. A claim made with lock is different until a save backs it with a change to the file: it stays until unlock or the ship.
Which files cannot be combined
Section titled “Which files cannot be combined”Which files cannot be combined is the project’s to say in .gitattributes:
*.graph lockable*.png -lockableThe first adds a kind of file and the second leaves one out. Without a line there, it is:
- any file that is not text,
- any large file,
- any file git is told to keep whole (
-mergeormerge=binary), - the scenes and prefabs of the game’s engine.
That decides what save holds and what a folder given to lock means. A file named to lock on its own can always be held.
Locks keep teammates out of each other’s way; they are not access control. Anyone who can push to the project can let go of anyone’s lock.