Svn – Managing multiple svn repos from TortoiseSVN

svntortoisesvn

I have created two repositories on a debian server. One svn repo, dev, will contain files and code used by engineers at the company. The other repo, doc, will contain sales docs, quotes etc that is to be used by the management/sales staff.

Given that the two repos usage requirements are different and the users that will use them have different levels of computer skills I want to be able to apply different management styles to each repository.

One such example, and my current issue, is that I want the doc repo to have auto-props enabled to add svn:needs-lock property to all files. This is a request from sales and management as they are not confident with using the SVN yet (thus they want to stick to a lock-modify-unlock versioing model).

However I don't want to apply these restrictions to the dev repository.

So through the TortoiseSVN client I am able to modify the subversion config file to enable auto-props etc.

But how can I manage these to repos that are on the same server and use the same client to satisfy this svn:needs-lock issue?

Is there are better way of approaching this concept of having two repos that need to have different levels of restrictions.

Note: we are a small company and have no IT admin as such. The engineers are required to administer the IT as a side task of normal work. So solutions need to be simple enough to not warrant constant maintenance.

Best Answer

I want to clarify and reword your question a bit. Your engineers who use dev repository want to use copy-modify-merge versioning model (better for non-binary textual content, e.g. for source code) and non-technical users will stick to a lock-modify-unlock (better for binary files, e.g. PSDs, DOCXs, XSLs etc...) model with repo doc.

  • Copy-modify-merge is the default versioning model with Apache Subversion and you don't have to perform any customization for the dev repo and/or on your techs clients.

  • In order to force Lock-modify-unlock model to doc repository you can perform the following maintenance tasks:

    1. Adjust client's SVN 'config' to automatically apply svn:needs-lock property on all newly added files. This task can be completed by enabling auto-props in Subversion config on client with enable-auto-props=yes and specifying auto-props pattern in the [auto-props] config area. See SVNBook for details on the runtime config area (you can automate the process with a AD security policy) BTW,

    2. Set svn:needs-lock property recursively on the repository root node to apply it to all items you currently have in the doc repository,

    3. Create a Subversion hook script for the doc repo that will check whether svn:needs-lock is set on binary files and denies the commit if the property is not present. The following article should be helpful: "Automatic lock-modify-unlock".