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.

  • 相关阅读:
    《P3953 [NOIP2017 提高组] 逛公园》
    《P4180 [BJWC2010]严格次小生成树》
    《济南icpc补题》
    《levil的因子和》
    《洛谷P2704 [NOI2001]炮兵阵地》
    《Codeforces Round #689 (Div. 2, based on Zed Code Competition)》
    《2174: Leapin' Lizards》
    《3820: Revenge of Fibonacci 》
    马拉车求最长回文子串
    二分训练
  • 原文地址:https://www.cnblogs.com/wangcl/p/2149748.html
Copyright © 2011-2022 走看看