views:

98

answers:

1

i am developing iphone projects on xcode. In SCM i am using svn but it is not possible to lock a file that on the svn to prevent other team member check out the file again (it copies the hole project to work offline). Is there any extension for xcode to solve that problem?

A: 

Dont know about doing it through xcode but you can do it through console by navigating to you project directory and typing

$ svn lock yourfile.m yourfile.h

then when you are done, do

$ svn unlock yourfile.m yourfile.h

Note: Locks only affect modification and delete operations (e.g. commit, delete) not checkouts. So other users can still checkout though they can't commit any changes made

Edit: Another approach you could use is to set the svn:needs-lock property such that the file becomes read-only and can only be edited by acquiring the lock on it. That way the wont inadvertently edit the file only to find that they cant commit it.

domino
do you know about exclusive lock? is that smth about preventing other team members check out a file again?
Merve Akbulut
No it only prevents them from editing when you lock the file. "The repository manages locks...and enforces locks during a commit operation" NOTE: Commit operation not checkout. You can get more info here: http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
domino
i need sth that only one team member edit a file at a time. if a file is taken by a developer, other cannot even download the file. i think svn wont solve this :(
Merve Akbulut
"if a file is taken by a developer, other cannot even download the file" may I ask why u want to do this? And why wouldnt using lock and svn:needs-lock suffice?
domino
I don't know of *any* source control that support locks to that extent. TFS can lock a file so that another developer cannot also mark it for editing. But this isn't possible with an offline source control, meaning all the good ones (svn/git/hg/bzr).I'd very seriously look at why you want this and try to come up with a different solution.
Jim T