Anurag
Anurag

Reputation: 661

what is the SVN locked error? Why does it happen?

I just encountered this error- svn: working copy 'xxx' locked

It gets fixed on running 'svn cleanup' in the working directory BUT why does this lock happen?

Upvotes: 0

Views: 1104

Answers (1)

ivoruJavaBoy
ivoruJavaBoy

Reputation: 1357

In general a lock is applied by SubVersion when something un-common happen and particular cuncurrency scenarious, it to prevent unusual unexpected behaviour during next operations, for example a commit..

From the official link (Link):

  1. The words “lock” and “locking” describe a mechanism for mutual exclusion between users to avoid clashing commits. Unfortunately, there are two other sorts of “lock” with which Subversion sometimes needs to be concerned.

  2. The second is administrative locks, used internally by Subversion to prevent clashes between multiple Subversion clients operating on the same working copy. This is the sort of lock indicated by an L in the third column of svn status output, and removed by the svn cleanup command, as described in the section called “Sometimes You Just Need to Clean Up”.

  3. There are database locks, used internally by the Berkeley DB backend to prevent clashes between multiple programs trying to access the database. This is the sort of lock whose unwanted persistence after an error can cause a repository to be “wedged,” as described in the section called “Berkeley DB Recovery”. Berkeley DB (BDB) repository backend is deprecated and hasn't been used for years by default. It's very unlikely that you are using BDB repositories.

Upvotes: 1

Related Questions