You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by ri...@philips.com on 2004/07/28 18:00:44 UTC

Filtering or hiding directories




Hello,

I have a variation on a problem discussed in another thread with the
subject
"Subversion filter?":

I would like to start using Subversion for projects with a directory
structure that looks something like this (structure has been simplified
for discussion):

level_1_dir/
 level_2_dir/
  level_3a_dir/
   level_4a_dir/
     source_file1
     source_file2
   level_4b_dir/
     large_binary_file
  level_3b_dir/
   level_4a_dir/
     source_file1
     source_file2
   level_4b_dir/
     large_binary_file
  ...

The problem is this: many of the users would like to be be able to check
out the directory tree and work with the source files at level 4 of the
directory structure, but they may not wish to see the level_4b_dir
directories.  In fact, the binary files in level_4b_dir directories are
large enough to cause disk space problems for many users if they were to
be all checked out at once.

What I would like to do is somehow hide the level_4b_dir directories
from users that wish to hide these directories.

Solutions I have considered:

1.  Create a revisioned directory tree with the same structure as one above
    and use svn:externals propreties to populate the level_3x_dir
    directories with level_4a_dir.

2.  Create a script that creates a local un-revisioned directory tree
    that looks like the one above and use svn checkout to populate
    the level_3x_dir directories with level_4a_dir.

3.  Checkout the whole directory tree, and then remove the directories
    the user does not wish to see.


What I don't like about solutions 1 and 2 is that making changes at the
level_3x_dir level and above becomes tricky and non-obvious to users
that are not svn savvy.  Changes to the mirror won't be reflected in the
main trunk.  Commits will not work recursively.  The "mirrored" directory
trees would have to be maintained somehow.

Solution 3 seems simpler, but some users may run into disk space issues
before the unwanted directories can be deleted.

What do you think, svn users, is there some other way I can tackle this?
Any discussion would be welcome.

Thanks,

Rick Varney


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Filtering or hiding directories

Posted by Ben Collins-Sussman <su...@collab.net>.
On Wed, 2004-07-28 at 13:00, rick.varney@philips.com wrote:
> 

> 1.  Create a revisioned directory tree with the same structure as one above
>     and use svn:externals propreties to populate the level_3x_dir
>     directories with level_4a_dir.

That would work.

> 
> 2.  Create a script that creates a local un-revisioned directory tree
>     that looks like the one above and use svn checkout to populate
>     the level_3x_dir directories with level_4a_dir.
> 

That would work too.


> 3.  Checkout the whole directory tree, and then remove the directories
>     the user does not wish to see.
> 

"Remove?"  If you mean 'rm -rf', then they'd only come back when the
user runs 'svn up'.

A fourth way is to use mod_authz_svn:  deny certain users (or groups of
users) the ability to "read" the undesired subdirs.  When they do a
checkout, their working copy will have an entry for the subdirs (in
.svn/entries), but no actual working directories.  The dirs will be
listed as 'absent' in the entries file.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org