June 7, 2018

File Locking in a Component-Based Development Workflow

Streams & Branches
Version Control

Preventing concurrent file checkouts is important. And it's especially important when working with binary files that can’t or shouldn’t be merged. In a standard development workflow, Helix Core supports exclusive checkouts with the +l file type modifier. When the +l modifier is set, only one user at a time can open a file for editing.

But problems can arise in a component-based development workflow. In that environment, common files are shared across projects. It’s often necessary to lock a unique binary file upon checkout when it’s being used at the same time in several projects.

To enforce an exclusive checkout policy for a single file that is present in several Streams or projects, users can leverage the +l file type modifier and the “Import+” Stream path. The “Import+” path allows users to map a path from outside a particular Stream or depot and submit changes to that path. When combined with the +l modifier, the “Import+” Stream path can be used to reference a file from another Stream and ensure that it is not checked out by more than one user at a time.

Consider the following scenario. One option is to branch a +l modified file from Stream Main to Stream Development. If you include that +l file in the Development Stream via an “Import+” path (which points back to Main), it will allow that file to be checked out in the Development or Main Stream.

Helix Core supports component-based development with exclusive file checkouts
The scene_player.jar file has been imported from the Main Stream into the Development Stream.

Since the file lives in Main and is only being referenced by Development, it can only be checked out in one Stream at a time. It cannot be checked out in both Streams at the same time.

The exclusive file locking features allows you to reference a file from another stream
The lock and import icons on the scene_player.jar file indicate that it can only be checked out by one individual at a time.

Looking to Prevent Concurrent File Checkouts?

The import+ Stream path doesn’t prevent concurrent file checkouts. It must be used with the +1 file type modifier to support file locking across Streams.

If you’re interested in learning more about this feature, contact our sales team to schedule a private product demonstration. Or, get Helix Core free for up to five users and 20 workspaces.