Single multiuser validation in Subversion - perhaps?

In our organization, we have the following problem. We want our web tree inspection to be monitored, but many of us want to be able to modify (and register) any file in that tree. We would also like there to be only one registration for the whole thing, because the tree is pretty huge. For parts of this tree, we are currently using RCS, which allows the behavior described above, but has several other disadvantages, of course.

Does anyone know how to do this (perhaps with some workaround) with Subversion on a Unix server?

+1


source to share


10 replies


Aren't the developers on their machines? Is such a tree so huge that it should be checked against a shared network drive on the server, since it is not suitable for individual developer workstations? I think this question needs some numbers to clarify the problems and arguments in this regard.



+2


source


Why not just check the bit of the tree you want to change? This shouldn't be a problem. I may be confused about what you mean by "one statement".



+1


source


In a typical SVN environment, each user has their own (full or partial) copy of the tree where they can make whatever changes they want to make on the tree without disrupting or breaking their employees. Then she decides what to check. Everyone else can check out when they think this is the best time to do it. and the main (deploying) user regularly checks (daily build) to check the integrity.

I think your confusion is RCS versus CVS / subversion: RCS locks the file for everyone else when editing, SVN locks nothing (locking is usually possible, but rarely used).

+1


source


@Lytha: I know RCS is blocking based and we have no problem with that in our scenario. I also know that you can use SVN with blocking, but the problem of validating each user persists ...

+1


source


Discs are cheap. Have each developer check a copy of the tree. Subversion solves the blocking problem, so each user who has their own copy does not prevent others from making changes. You will be much more productive and better accountable for changes if each person reviews and manages their own version of the source tree.

+1


source


As you've probably seen from other posts, the general answer to this question is "Don't do this." In general, Subversion is used to check out some or all of a repository in a local workspace.

If you absolutely, positively, should have an idea of ​​all the repositories for every developer, but the developer only changes a small part, here is a potential solution for you. You need to develop a few scripts to facilitate what I am describing (which are based on the UNIX IDE I used).

I also assume from your comments that it is UNIX or Linux environment - I don't think the following is possible on Windows.

  • Mark as available only for the entire project at a specific location. Make sure all developers have access to it.
  • Have a developer script that a developer can execute that traverses the directory structure by mirroring the structure using symbolic links to the read-only directory in that developer workspace.
  • When checking out a portion of the tree for editing, remove the symlink and get out of that path from Subversion (you probably want to script the wrap commands svn

    to handle this)
  • Either on svn commit

    or in a separate script, you probably want to delete the workspace directory and restore the symbolic link.
  • Updated read-only copy either by post-commit

    hook in Subversion or periodically by cron

    or something similar.

Symbolic links provide a view of the entire tree for each developer and allow "local" validation of only those parts of the tree that the developer is actively editing.

The reason for this is that Subversion was not really meant to be used in this way. However, this method will work with some pain for what you are describing.

+1


source


I suggest that you use one dedicated web tree account that all developers have access to and check the web tree as that user.

0


source


@Jesper: Yes, that would be possible. An additional account for all members, possibly with an additional sudo rule.

@Jon: The point is that basically we all have to change some files in some part of the tree. That's why we all need the whole tree, but we don't want them to have many extracts.

0


source


Subversion allows you to check any part of the tree, and since 1.5 it also supports infrequent checks . This means that you can set up your check at the individual directory level (but not at the individual file level, as RCS can go).

So, for example, if your repository looks like this:

Repository Root
  tags
  branches
  trunk
    doc
    src
      module1
        resources
      module2
    images

You can only check files in a directory module1

(not its subdirectories) using this:

svn checkout --depth=files svn://server/repository/trunk/src/module1

      

If you also need the content of the subdirectory, you can adjust the size of your appearance later, see the documentation.

0


source


If you notice a working copy that bothers you is latency / throughput, remember that the working copy is completely offline. This means that you can make your order for a huge repository and then just copy that "working copy" to those who need it.

The same trick also works well for branches - if you have an unmodified recent working copy of the trunk, you can simply copy it and then "svn switch" to the new branch.

  • Checkout a huge repository for base_working_copy (nightly?)
  • cp -a base_working_copy my_working_copy (and whoever else needs it)
  • cp -a base_working_copy my_branch
  • cd my_branch
  • switch my branch to any branch url

I have also used this successfully with snailmail with large working copies for people with bandwidth issues.

See also: Using Subversion with a Really Big Site

0


source







All Articles