Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN "Already Locked Error"

When trying to commit a change to a repository ( where I am the only user ) I get an error

Path '/trunk/TemplatesLibrary/constraints/templates/TP145210GB01_PersonWithOrganizationUniversal.cs' is already locked by user 'admin' in filesystem '/guest/gam/subversion/cdaapi/db' 

I am the user 'admin'.

I have tried the following, all without success

  • running a "clean up" from Tortoise SVN
  • checking out a new copy
  • using the "repo browser" to break locks, but no locks are shown ( as per SVN file locked by me, now cannot commit it )

    I am completely stuck now as I have a repository now that I can not commit any updates to.

    Any ideas how I fix this

    More Info, as requested :

    SVN Status command yields ( I have made edits to one file )

            92       77 admin        TP146228GB01_EncompassingEncounter.cs         92       83 admin        TP145212GB02_WorkgroupUniversal.cs         92       83 admin        TP146248GB01_ReferenceURL.cs         92       85 admin        TP145201GB01_PatientUniversal.cs         92       83 admin        TP145204GB02_RecipientWorkgroupUniversal.cs         92       83 admin        TP145202GB01_RecipientPersonUniversal.cs         92       83 admin        TP145203GB02_RecipientOrganizationUniversal.cs         92       77 admin        TP145205GB01_PersonUniversal.cs         92       83 admin        TP145202GB02_RecipientPersonUniversal.cs         92       83 admin        TP145203GB03_RecipientOrganizationUniversal.cs         92       85 admin        TP145211GB01_HealthCareFacilityUniversal.cs         92       85 admin        TP145200GB01_AuthorPersonUniversal.cs         92       83 admin        TP145207GB01_AuthorDeviceUniversal.cs     M   92       87 admin        TP146226GB02_Consent.cs         92       85 admin        TP146229GB01_TextSection.cs         92       83 admin        TP145204GB03_RecipientWorkgroupUniversal.cs         92       86 admin        TP145018UK03_CustodianOrganizationUniversal.cs         92       83 admin        TP145208GB01_AuthorNonNamedPersonUniversal.cs         92       70 admin        TP145214GB01_DocumentParticipantUniversal.cs         92       85 admin        TP145007UK03_RelatedEntity.cs         92       80 admin        TP146224GB02_Atachment.cs         92       83 admin        TP146227GB02_ServiceEvent.cs         92       77 admin        TP145210GB01_PersonWithOrganizationUniversal.cs 

A svn commit then yields

svn commit --message updates Sending        TP146226GB02_Consent.cs Transmitting file data .svn: E195022: Commit failed (details follow): svn: E195022: File    'D:\BENBUN_CODE\WORK\cdaapi\trunk\TemplatesLibrary\constraints\templates\TP146226GB02_Consent.cs' is locked in another working copy svn: E170007: No lock on path '/subversion/cdaapi/!svn/wrk/3c75d861-8462-b94e-8729-df54843044f9/trunk/TemplatesLibrary/constraints/templates/TP146226GB02_Consent.cs' (Status 423 on PUT Request) svn: E175002: Server sent unexpected return value (423 Locked) in response to PUT request for '/subversion/cdaapi/!svn/wrk/3c75d861-8462-b94e-8729-df54843044f9/trunk/TemplatesLibrary/constraints/templates/TP146226GB02_Consent.cs'   

As requested output of SVN st -u is shown below

>svn st -u M               92   TP146226GB02_Consent.cs Status against revision:     92               
like image 928
BENBUN Coder Avatar asked Mar 20 '12 00:03

BENBUN Coder


People also ask

Why is svn locked?

It is good practice to get a file lock before editing a file. The lock tells other users that the file is being edited, and you can avoid merge issues. When you set up source control, you can configure SVN to make files with certain extensions read only. Users must get a lock on these read-only files before editing.

How do you break the lock in TortoiseSVN?

To release a lock manually, select the file(s) in your working copy for which you want to release the lock, then select the command TortoiseSVN → Release Lock There is nothing further to enter so TortoiseSVN will contact the repository and release the locks.

What is svn lock?

Name. svn lock — Lock working copy paths or URLs in the repository so that no other user can commit changes to them.


2 Answers

If your SVN repository is locked by AnkhSVN, just use "cleanup" command from AnkhSVN to release the lock! ;)

like image 127
Adriien M Avatar answered Oct 14 '22 08:10

Adriien M


I had the same problem. This problem is easily solved if you issue the Cleanup command from AnkhSVN.

like image 27
Mário Meyrelles Avatar answered Oct 14 '22 08:10

Mário Meyrelles