[ros-dev] locking files for the audit.

Ged Murphy gedmurphy at gmail.com
Wed Mar 8 22:24:22 CET 2006


I have now started locking unaudited files in the repository.
A special user called 'audit' has been created to do this lock. There 
are two reasons for this:
1. The user who locks the file can still commit without unlocking. 
Having a separate user to lock files removes this issue.
2. All developers can have the username and password for locking, 
providing a system wide user to lock files. (ask Fireball for the u/n & p/w)


How do you lock files?
I'll list the method for tortoise-svn via the GUI. Die hard cmd line 
gurus can adapt it to suit :)

- Firstly, go into your tortoise-svn settings and on the general page, 
click 'clean now' for Subversion authentication data. This will remove 
your current u/n & p/w
- To 'get a lock' on the file(s),  right click the file / directory , 
navigate to tortoise-svn and select 'get lock'. Getting a lock will 
trigger svn to contact the server automatically and apply the lock.
- Next pick the file / directory you just locked and right click. Select 
file properties and under the subversion tab add 'svn:needs-lock' from 
the combo box. Add a '*' for the value, check the recursive box and 
click set. This will ensure all locked files which are checked out are 
set as read only locally. This is just used as a handy reminder.
- You can now commit the files which will add the svn:needs-lock 
property, however ensure that on the commit dialog, the 'keep locks' 
checkbox is selected otherwise it will remove the lock you just placed.

Once I've audited the code, how do I unlock the files?
This is done as your regular username, not as the 'audit' user, so you 
can clean the 'audit' username / password in the same manner as before 
if you opted to save it.
Again, I'll list the tortoise method.

- Right click on the file / directory you want to unlock, navigate to 
tortoiseSVN and select 'check for modifications'
- Select the file(s) you want to unlock, right click and select 'break 
the lock'. SVN will automatically contact the repo and unlock the files.
- Don't forget to remove the svn:needs-lock property from the files to 
ensure they are no longer checked out as read only.


I have so far locked the kernel, however I'm unsure if :
1. we're just gonna lock everything in one go (this would make life easy 
to start with) and unlock everything as we deem it to be OK
2. lock only dirs we thing need auditing and unlock once clean.

I personally prefer option 1 as it ensures we don't miss anything, and 
would probably be quicker in the long run.

Regards,
Ged.


More information about the Ros-dev mailing list