zoukankan      html  css  js  c++  java
  • SVN 悲观锁 五步曲

    In some case you need to force developers to always lock files on a project when they make changes. If this property is set the developers is forced to lock a file and then only he can make changes to that file. You will still have the functionality to steal locks when someone isn’t available to unlock a file.

    Here is how you need to setup your SVN solution.

    Step 1:

    Go to the properties screen of your repository.

    022210_0659_SVNneedsloc1

    Step 2:

    Click “New” to add a new property. Select “SVN:needs-lock” under Property Name. Give the following Property Value: “*”. This will set the property to all files in repository. Check the checkbox next to “Apply property recursively”. Click OK.

    022210_0659_SVNneedsloc2

    Step 3:

    The property will now be set to all your files. You need to commit all the files for the change to take effect.

    Step 4:

    Next you need to set properties in the Subversion config file on each user’s local machine. This config file ensures that every new file that’s added to your repository, property ’svn:needs-lock’, is also set.

    The config file will be in the following directory: “C:\Users\\AppData\Roaming\Subversion\”

    Open the ‘config’ file in notepad:

    Make sure your config file resembles the following:

    “### Automatic properties are defined in the section ‘auto-props’.
    enable-auto-props = yes

    ### Section for configuring automatic properties.
    [auto-props]
    *.* = svn:needs-lock = true”

    Step 5:

    Save the config file.

  • 相关阅读:
    四则运算单元测试
    四则运算2
    课堂记录
    软件工程第一课,设计简单小学四则运算
    阅读计计计计计计划
    团队开发——冲刺1.a
    博客园之用户体验
    软件项目风险评估计划
    《人月神话》读书笔记 第2篇
    课堂作业——找1
  • 原文地址:https://www.cnblogs.com/wangcl/p/2149748.html
Copyright © 2011-2022 走看看