Quick Start Guide to Tortoise SVN Client with File Lock Property

 Short URL: go.computerandnet.com/svn
Question: How do I set up SVN with LabVIEW with lock property for files?
This article contains below sections:
  1.  Download and Install TortoiseSVN
  2.  Additional Steps to Configure Lock Mode for Binary Files
  3.  Procedure for Setting Lock Property for Existing Files in SVN

Download and Install TortoiseSVN

Download Tortoise SVN Client. Choose the 32-bit or 64-bit version of TortoiseSVN based on your system's bitness. Follow the onscreen instructions for installing the TortoiseSVN Client.

Configure Lock Mode for New Binary Files

Kindly note that the below steps would be applicable only for  new files that are submitted from that particular client system. For any files that are already present, a separate one time procedure needs to be followed, which is explained in the next section.

Kindly note that the below steps needs to be done in every client system, where you would be submitting files to SVN.

1. Right click on any folder in Windows Explorer and go to TortoiseSVN -> Settings as shown in image below.
TortoiseSVN Settings Option

2. Click on the "Edit" button for the subversion configuration file.
TortoiseSVN Settings Window

3. This opens the TortoiseSVN configuration file in Notepad.
4. Make the below edits to the configuration file.
    Under the section "[miscellany]", add the below text.
    enable-auto-props = yes

    Under the section "[auto-props]", add the below lines for setting up "Needs Lock" property for *.doc files and *.ppt files.
    *.doc  = svn:needs-lock=*
    *.ppt  = svn:needs-lock=*

    Similarly, for all binary files, please add a line for each. For LabVIEW files, please add below files in [auto-props] section.
    *.vi  = svn:mime-type=application/labview.vi;svn:needs-lock=*
    *.ctl  = svn:mime-type=application/labview.ctl;svn:needs-lock=*
    *.lvlib  = svn:mime-type=application/labview.lvlib;svn:needs-lock=*
    *.lvproj  = svn:mime-type=application/labview.lvproj;svn:needs-lock=*
    *.lvclass  = svn:mime-type=application/labview.lvclass;svn:needs-lock=*
    *.xctl  = svn:mime-type=application/labview.xctl;svn:needs-lock=*

    For locking any file type, you can use
    * = svn:needs-lock=*

    Kindly note that placing # infront of any line is equivalent to commenting out the line!

    Procedure for Setting Lock Property for Existing Files in SVN

    1. Right Click on TortoiseSVN folder, go to TortoiseSVN -> Properties.

    TortoiseSVN -> Properties
    2.  In the window that opens, Go to New -> Needs Lock.
    SVN - New -> Needs Lock

    3. Select "Locking Required" and click "Ok".

    4. Commit the files/folders to SVN by right clicking on the SVN folder and choosing "SVN Commit".
    This would have modified all the files/folders and you need to submit them to SVN for the locking to take effect.

    No comments:

    Feel free to leave a piece of your mind.

    Powered by Blogger.