Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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".

share|improve this answer
This is more-or-less exactly what I want to do with the exception that each user will have both repositories checked out. In general people with predominantly use dev or doc but there are plenty of use cases where the employees will need to modify files in both repositories. So is there a way of combining bullet one and bullet two on one client machine, without conflicts? Can I possibly use hooks to achieve this. – Mike Wells Oct 26 '12 at 12:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.