crelf Posted October 1, 2008 Report Share Posted October 1, 2008 QUOTE (Shaun Hayward @ Sep 29 2008, 05:49 PM) ...now time for the whole "should we enforce locking or automatically clear any svn:needs-lock properties " debate... Quote Link to comment
crelf Posted October 5, 2008 Author Report Share Posted October 5, 2008 OK, since no one else is going to bite, I'll start. I like locking. In a perfect world, we wouldn't need it because communication would be perfect between developers, so when someone wanted something then they'd know (or would be able to conveniently ask to find out) if a file's unlocked. This doesn't always work in practise, and merging binary files (like VIs ) can be a real pain. For example: (this happened to me over the last week) imagine two developers working feverishly on a project in parallel. It's one of those projects where there's lots to do, but thankfully there's good requirements and design documentation, so it's a to-do list of TestStand sequences to be populated (I say populated, because they all came from the same template). If there's no locking mechanism, then there only method is for the developers to talk to each other to make sure they're not stepping on each others' toes (did I mention there is considerable physical distance between the developers?) Don't misunderstand: I certainly don't suggest that locking should form the basis of a work scheduling system, but it's a good check/balance. Quote Link to comment
Aristos Queue Posted October 6, 2008 Report Share Posted October 6, 2008 LV R&D only locks binary files. The text files are easy to integrate. [This statement applies to both our C/C++ programming and our G programming.] Quote Link to comment
jdunham Posted October 7, 2008 Report Share Posted October 7, 2008 Our project has lots of typedefs and interconnected functionality. We (4 developers) use SVN and we don't use locking, but we sure don't look forward to merging. We have some conventions and some custom tools which help with the merging, but it makes me annoyed that they needed to exist. Sometime soon, I am going to try locking to see whether it improves our workflow. Quote Link to comment
James N Posted October 8, 2008 Report Share Posted October 8, 2008 QUOTE (jdunham @ Oct 6 2008, 12:54 AM) Sometime soon, I am going to try locking to see whether it improves our workflow. Me too. There are several groups of LabVIEW developers at my company. Another guy started out his repo with the lock-modify-unlock method and convinced me with a demo. Now I'll have to convince my guys. Along this line.... I found this site that details how to alter existing repository files with the svn:needs-lock property. http://www.orcaware.com/svn/wiki/Automatic...k-modify-unlock -James Quote Link to comment
Randy Posted October 10, 2008 Report Share Posted October 10, 2008 Just a note for those of you who were using the instructions above to automatically add the svn:needs-lock property to labview files before commiting to the repository. I had multiple issues with the setup of the pre-commit hook file in the linked wiki, what turned out to be the problem was some issues with text parsing, I cleaned up the issues that I found (it was a major headache to debug) and am posting the modified coded below, please note that the SVNLOOK and TEMP variables are specific to my installation and may need to be modified for yours. Regards, Randy @ECHO OFFset REPOS=%1set TRANSACTION=%2set SVNLOOK=c:\svnserve\svnlook.exeset TEMP=c:\repository</P> <P>if exist %TEMP%\tempfile%2 del %TEMP%\tempfile%2for /f "usebackq tokens=1*" %%i in (`%SVNLOOK% changed -t %2 %1`) do @if NOT %%i==_D @echo %%j>> %TEMP%\tempfile%2 if not exist %TEMP%\tempfile%2 goto NOFILESADDED for /f "usebackq tokens=*" %%i in (`findstr /E /I /R "\.bmp.$ \.gif.$ \.ico.$ \.jpeg.$ \.jpg.$ \.png.$ \.tif.$ \.tiff.$ \.doc.$ \.jar.$ \.odt.$ \.pdf.$ \.ppt.$ \.swf.$ \.vsd.$ \.xls.$ \.zip.$ \.vi.$ \.vit.$ \.ctl.$ \.llb.$ \.dwg.%CONTENT%#34; %TEMP%\tempfile%2`) do ( %SVNLOOK% propget -t %2 %1 svn:needs-lock "%%i" 1> nul 2> nul if ERRORLEVEL 1 ( echo commit denied, binary files must have property svn:needs-lock >&2 type %TEMP%\tempfile%2 >&2 del %TEMP%\tempfile%2 EXIT /B 1 ) ):NOFILESADDEDdel %TEMP%\tempfile%2EXIT /B 0 QUOTE (jdunham @ Oct 5 2008, 11:54 PM) Our project has lots of typedefs and interconnected functionality. We (4 developers) use SVN and we don't use locking, but we sure don't look forward to merging. We have some conventions and some custom tools which help with the merging, but it makes me annoyed that they needed to exist. Sometime soon, I am going to try locking to see whether it improves our workflow. Quote Link to comment
crelf Posted October 10, 2008 Author Report Share Posted October 10, 2008 QUOTE (Aristos Queue @ Oct 5 2008, 02:49 PM) LV R&D only locks binary files. The text files are easy to integrate. That's a good compromise. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.