| 32 | Breaking Someone Else’s Lock |
File locking is a consensual activity; it’s designed to save a team effort where more than one person might change an unmergeable file. Sometimes, though, someone might not play by the rules. If a team member locks a file and goes home for the night (or worse goes on vacation!), then no one else is able to lock and edit the file. Subversion allows us to forcibly break a lock or more commonly to steal a lock from someone else.
Stealing a lock is usually preferred, because the Subversion server will unlock the file and relock it for a different user all in one atomic operation. If instead we unlock the file and then try to relock it, there’s a small chance that another user can get in first and lock the file ahead ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access