SVN Lock mode by default : Impossible to commit
We use SVN with the config ". = svn:needs-lock=*" to automatically lock files on all our repositories (parameter in the config file of SVN on the computer of the developer).
So a source file can be modified by only one developer at a time.
It looks it’s a problem with SQL Source Control because the files in the local directory of the working databases are in read only.
When I commit a change, I have the message “Do not have permissions to modify the file C:\Documents and settings...\Stored Procedures\dbo.PS_select.sql”.
The commit is stopped.
Of course, we would like to stay in lock mode with Subversion...
We currently do not support lock or exclusive checkouts (lock-modify-unlock model). We are supporting a copy-modify-merge model.
In order to use SQL Source Control, you’ll need to use this model for now until we implement locking/exclusive checkouts in a future release.
To do this, undo the change to the Subversion configuration file, remove the needs-lock property from any file in the repository, manually svn update the WorkingBases directory, unlink and then relink the db in SSMS.
Depending on your OS, related files can be found in:
C:\Documents and Settings\\Local Settings\Application Data\Red Gate\Logs\SQL Source Control 0
or
C:\Users\\AppData\Local\Red Gate\Logs\SQL Source Control 0
1) Right click on WorkingBases\\Stored Procedures\dbo.PS_select.sql
and select Properties
*You can find the which corresponds to your db by looking in the LinkedDatabases.xml file.
2) Select the “Subversion” tab at the top
3) Click the “Properties…” button near the bottom
4) Is there a svn:needs-lock property? If so, remove it.
5) Click OK to close the SVN properties window
6) Click OK to close the file properties window
7) Right click again and commit the change to Subversion (this is just committing the change that a lock is not needed on that file)
Now, you should be able to commit the file from SQL Source Control with out getting this permission error. Please let us know if you still have any problems.