File Locking

Diversion provides server-enforced exclusive and advisory file locks. Locks prevent concurrent edits to binary assets that cannot be merged.

Lock Types

  • Exclusive: only the lock holder may submit changes. Others get a read-only copy. Default for binary files.
  • Advisory: communicates intent to edit without preventing others. Use for text-based assets where merging is possible but undesirable.

Acquiring a Lock

# Exclusive lock (default)
diversion lock Content/Maps/City_Hub.umap

# Advisory lock
diversion lock Content/Blueprints/PlayerController.uasset --type advisory

# Lock with explicit TTL
diversion lock Content/Maps/City_Hub.umap --ttl 8h

Viewing Current Locks

diversion locks list
# FILE PATH                              | LOCKED BY | SINCE  | EXPIRES
# Content/Maps/City_Hub.umap             | jsmith    | 2h ago | in 2h
# Content/Textures/env_forest.uasset     | rperez    | 45m    | in 3h 15m
# Content/Blueprints/PlayerController.uasset | akumar | 1h    | in 3h

Releasing a Lock

diversion unlock Content/Maps/City_Hub.umap
# ✓ Lock released: Content/Maps/City_Hub.umap

Locks are also released automatically when you submit a changelist that includes the locked file, or when the TTL expires.

Auto-Expiry Policy

Locks have a default TTL of 4 hours, configurable per workspace:

diversion config lock.default_ttl 8h   # workspace-level
diversion config lock.default_ttl 12h --global  # global default

A lock is automatically extended by 1x its TTL when the holder submits a commit that touches the locked file — so active work never expires mid-session.

Admin Override

Workspace Admins and Owners can force-release any lock:

diversion unlock Content/Maps/City_Hub.umap --force --reason "jsmith offline"
# âš  Force-releasing lock held by jsmith. This action is logged.