[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Candidate bug: svnadmin should refuse to create nested repositories

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Fri, 22 Aug 2008 19:38:14 +0300 (Jerusalem Daylight Time)

Hyrum K. Wright wrote on Fri, 22 Aug 2008 at 09:09 -0700:
> > -------Original Message-------
> > From: Quinn Taylor <quinntaylor_at_mac.com>
> > Subject: Re: Candidate bug: svnadmin should refuse to create nested repositories
> > Sent: 22 Aug '08 08:52
> >
> > >> It is definitely a no-no to create a repository within a  
> > >> repository... so it wouldn't hurt if svnadmin would detect and warn  
> > >> about, or event prevent, this situation.
> > >
> > > Agreed.  This can lead to a sticky situation.  The one question,  
> > > though, is how far up the directory structure should svnadmin  
> > > recurse to determine if the proposed new repository is in an  
> > > existing repository?  1 level?  2 levels?  All the way to the root?
> > >
> > > -Hyrum
> >
> > Unless the user is creating deeply-nested directories within the  
> > repository and creates a "sub-repository" therein, it shouldn't be  
> > necessary to traverse up too many levels. OTOH, creating repositories  
> > is a relatively infrequent event, and traversing up to the root  
> > wouldn't incur a heavy penalty.
>

Well, "svnadmin create $PATH" could just do whatever svn_ra_local__open()
does to figure out whether $PATH is contained in some repository... which
boils down to calling svn_repos_find_root_path() in the right place,
right?

Daniel

> Agreed, and directory structures are rarely super deep. So while in
> theory the search algorithm would be O(n) in the number of nested
> directories, in practice n wouldn't be that large.
>
> > However, the intricacies of stopping  
> > at "the root" for various platforms and locations (like networked  
> > volumes) adds complexity.
>
> That's what the svn_dirent_is_root() API is for. We already do
> to-the-root recursion to see if we are in a working copy as part of
> 'svn add --parents'.
>
> > In the end, it would probably depend on the  
> > willingness of a volunteer programmer to deal with all those  
> > issues.  :-)
>
> This "volunteer programmer" is just trying to think through a few of
> the issues involved. ;) In any case, would somebody be willing to
> file an enhancement request in the issue tracker, referencing this
> thread?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-22 18:38:43 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.