"Keven Ring" <firstname.lastname@example.org> wrote in message
> Edward Diener wrote:
> >Thanks, but svn:externals will not work for me. Depending on the user, I
> >want a particular local subdirectory to point to a particular repository
> >path. Furthermore the repository path will be on a different repository
> >the top-level directory. As I understand svn:externals it sets the
> >particular subdirectory to point to a particular repository path for all
> >Here is the practical case with which I am working. First, for whatever
> >reason, in my place of work we are using svnserve rather than httpd, so
> >do not have the fine-grained access control which httpd provides per
> >repository path. I want to be able to check out from a repository path
> >then, for a particular subdirectory of the local directory to which I
> >out my files, switch to a repository path on another machine based on the
> >user. This is all being done programatically ( Pysvn ).
> >Why do we need to do this ? Because we need to provide access to specific
> >files of the same name in a subdirectory based on the user. So if I have
> >subdirectory called 'conf' and a file called 'topsecret', I want user A
> >get 'topsecret' from a path on repository X and user B to get 'topsecret'
> >from a path on repository Y. In no instance should user A and user B be
> >to access files on a repository for which they do not have permission.
> >The only way I can think of doing this is that after the initial
> >remove the .svn directory in 'conf' and then do a checkout from the
> >path in the second repository. Given that this can practically be done I
> >hope that when updates and commits are done recursively from the original
> >top-level checkout directory that svn is mart enough to work with two
> >different repositories at the same time.
> Based on your description, the "conf" directory exists in at least 3
> main repository
> User A's repository
> User B's repository
> Unless the 'conf' directory in the main repository contains files that
> are common to all users (as opposed to the "topsecret" file that is
> unique for various users), why have the "conf" directory in the main
> repository to begin with. Then, you aren't deleting the .svn directory
> within "conf" that was created during the initial checkout of the main
> repository, and everything else *should* work the same.
Good idea. The conf directory for each user is completely different.
> If the conf directory in the main repository does contain common files,
> then you are in a bind, unless you can change your structure to
> something like:
> or similar.
> The other option that *might* be do-able (although potentially quite
> tedious) would be to provide externals from the User repositories back
> to the "common" repository. Then, a user checks out their *private*
> repository, and magically obtains the common stuff.
> Unfortunately, neither of these two solutions will allow you to
> recursively commit or update, since svn:externals are not followed (as
> pointed out by Lee), and neither are different checkouts.
I have always thought that different checkouts work fine with update and
commit when starting at some top-level svn controlled directory and doing it
recursively. In fact it would be hard to believe it does not. Each directory
has its own .svn file, so it knows the repository path it points to.
> I would defer to someone else as to whether your solution (delete the
> conf/.svn directory, and re-checkout from a different repository) would
> have the desired effect. On the surface, it might, because the conf
> directory itself would be listed as being under version control (in the
> main repository), but the entries that are under version control in the
> conf directory belong to either User A or User B's repository. Given
> that you already effectively programmatically checking files out, it
> shouldn't be hard to do...
The repositories themselves have no pointers to local directories but rather
the other way around. The local directories under svn control point to
Thanks for your suggestion of not having the 'conf' directory under svn in
the main repository. It will save me from having to delete the .svn
directory before checkout again.
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Wed Sep 8 19:00:15 2004