You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Diederick Huijbers <d....@apollo-ict.nl> on 2007/02/27 22:14:43 UTC

Multiple repositories with mixed directories (newbie)

Hi all,

I've been reading and asking on irc #svn/google about a problem I have 
with understanding svn and my CMS.

I've got a modular CMS (content management system), with a directory 
layout like:

css
css/modules
css/modules/page
css/modules/product
HTML
HTML/modules
HTML/modules/product
HTML/modules/page
index.php
js
js/modules
js/modules/product
js/modules/page


So in this example you see (some of) the directories of the cms. You see 
I've got 2 modules: page and product. The source files are spread over 
multiple locations/sub-directories.

The source for the page module is spread into:
-------------------------------------------------------------------------------
css/modules/page
js/modules/page
HTML/modules/page
...etc....


The source for the produduct module is spread into:
-----------------------------------------------------------------------------------------
css/modules/product
js/modules/product
HTML/modules/product


Now, I want to start using svn, so I can checkout revisions/releases of 
a individual modules. For example, I want to be able to only checkout 
the product module, or the page module.

Sadly I can't change the directory layout. (I've got my reasons.... ) As 
this is probably a general problem more people have I hope some of you 
could help me to fix this problem.

What can I do?

Thanks,
Roxlu

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

Re: Multiple repositories with mixed directories (newbie)

Posted by Kylo Ginsberg <ky...@gmail.com>.
Ah, thanks Ryan!  I hadn't grokked that distinction, but I
experimented a bit.  That makes good sense now.  Thanks,

Kylo

On 2/28/07, Ryan Schmidt <su...@ryandesign.com> wrote:
>
> On Feb 28, 2007, at 15:10, Kylo Ginsberg wrote:
>
> > Fwiw, another idea is to write a checkout script that knows the format
> > of your repository, and does non-recursive checkouts of the upper
> > directories, followed by a normal recursive checkout of the
> > leaf/module directories.   I had to do something like this to get
> > support for cvs-style modules with subversion.
> >
> > Something like:
> > #!/bin/bash
> >
> > mod=$1
> > svnroot=svn://server/repos
> >
> > svn co -N css css
> > svn co -N css/modules css/modules
> > svn co css/modules/$mod css/modules/$mod
>
> That's not how you're supposed to accomplish that. I was under the
> impression that you have now created, for example, a working copy
> modules which is unrelated to the css working copy containing it, and
> the same for each module.
>
> What I think you want instead is:
>
> svn co -N css css
> svn up -N css/modules
> svn up css/modules/$mod
>
> That way everything is still seen as a part of the single css working
> copy.
>

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

Re: Multiple repositories with mixed directories (newbie)

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 28, 2007, at 15:10, Kylo Ginsberg wrote:

> Fwiw, another idea is to write a checkout script that knows the format
> of your repository, and does non-recursive checkouts of the upper
> directories, followed by a normal recursive checkout of the
> leaf/module directories.   I had to do something like this to get
> support for cvs-style modules with subversion.
>
> Something like:
> #!/bin/bash
>
> mod=$1
> svnroot=svn://server/repos
>
> svn co -N css css
> svn co -N css/modules css/modules
> svn co css/modules/$mod css/modules/$mod

That's not how you're supposed to accomplish that. I was under the  
impression that you have now created, for example, a working copy  
modules which is unrelated to the css working copy containing it, and  
the same for each module.

What I think you want instead is:

svn co -N css css
svn up -N css/modules
svn up css/modules/$mod

That way everything is still seen as a part of the single css working  
copy.


> <repeat for HTML and js in your example below>
>
> A possible downside to this is that the non-recursive checkouts of the
> top directories *will* pull the files in each of those directories.
> YMMV.



-- 

To reply to the mailing list, please use your mailer's Reply To All  
function


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

Re: Multiple repositories with mixed directories (newbie)

Posted by Kylo Ginsberg <ky...@gmail.com>.
Diederick,

Fwiw, another idea is to write a checkout script that knows the format
of your repository, and does non-recursive checkouts of the upper
directories, followed by a normal recursive checkout of the
leaf/module directories.   I had to do something like this to get
support for cvs-style modules with subversion.

Something like:
#!/bin/bash

mod=$1
svnroot=svn://server/repos

svn co -N css css
svn co -N css/modules css/modules
svn co css/modules/$mod css/modules/$mod

<repeat for HTML and js in your example below>

A possible downside to this is that the non-recursive checkouts of the
top directories *will* pull the files in each of those directories.
YMMV.

Best regards,
Kylo

On 2/27/07, Diederick Huijbers <d....@apollo-ict.nl> wrote:
> Hi all,
>
> I've been reading and asking on irc #svn/google about a problem I have
> with understanding svn and my CMS.
>
> I've got a modular CMS (content management system), with a directory
> layout like:
>
> css
> css/modules
> css/modules/page
> css/modules/product
> HTML
> HTML/modules
> HTML/modules/product
> HTML/modules/page
> index.php
> js
> js/modules
> js/modules/product
> js/modules/page
>
>
> So in this example you see (some of) the directories of the cms. You see
> I've got 2 modules: page and product. The source files are spread over
> multiple locations/sub-directories.
>
> The source for the page module is spread into:
> -------------------------------------------------------------------------------
> css/modules/page
> js/modules/page
> HTML/modules/page
> ...etc....
>
>
> The source for the produduct module is spread into:
> -----------------------------------------------------------------------------------------
> css/modules/product
> js/modules/product
> HTML/modules/product
>
>
> Now, I want to start using svn, so I can checkout revisions/releases of
> a individual modules. For example, I want to be able to only checkout
> the product module, or the page module.
>
> Sadly I can't change the directory layout. (I've got my reasons.... ) As
> this is probably a general problem more people have I hope some of you
> could help me to fix this problem.
>
> What can I do?
>
> Thanks,
> Roxlu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

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

Re: Multiple repositories with mixed directories (newbie)

Posted by Diederick Huijbers <d....@apollo-ict.nl>.
Hi Ulrich,

Thanks a lot for your reply. At least I know now it's just not possible. 
I can't change the layout because I've created a couple 
applications/script which use the current layout to create 'installable' 
versions of the website. Also in the code I refer to some paths which 
would be a enormous job to fix.

I'll just create one repos than where all the modules are put in.

Gr. Roxlu

Ulrich Eckhardt wrote:
> On Tuesday 27 February 2007 23:14, Diederick Huijbers wrote:
>   
>> [...] You see I've got 2 modules: page and product. The source files 
>> are spread over multiple locations/sub-directories.
>>
>> The source for the page module is spread into:
>> --------------------------------------------------------------
>> css/modules/page
>> js/modules/page
>> HTML/modules/page
>> ...etc....
>>
>>
>> The source for the produduct module is spread into:
>> --------------------------------------------------------------
>> css/modules/product
>> js/modules/product
>> HTML/modules/product
>>
>>
>> Now, I want to start using svn, so I can checkout revisions/releases of
>> a individual modules. For example, I want to be able to only checkout
>> the product module, or the page module.
>>
>> Sadly I can't change the directory layout. 
>>     
> [...]
>   
>> What can I do?
>>     
>
> Nothing. Your 'modules' are not really modular since they are mixed with each 
> other. Since SVN works on a per-directory layout but you would need to select 
> single files from within different directories there is nothing you can do.
>
> I could argue about why and how you could rearrange your code, but if you are 
> unable or unwilling, that doesn't help.
>
> Uli
>
>   

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

Re: Multiple repositories with mixed directories (newbie)

Posted by Diederick Huijbers <d....@apollo-ict.nl>.
Ulrich Eckhardt wrote:
> On Tuesday 27 February 2007 23:14, Diederick Huijbers wrote:
>   
>> [...] You see I've got 2 modules: page and product. The source files 
>> are spread over multiple locations/sub-directories.
>>
>> The source for the page module is spread into:
>> --------------------------------------------------------------
>> css/modules/page
>> js/modules/page
>> HTML/modules/page
>> ...etc....
>>
>>
>> The source for the produduct module is spread into:
>> --------------------------------------------------------------
>> css/modules/product
>> js/modules/product
>> HTML/modules/product
>>
>>
>> Now, I want to start using svn, so I can checkout revisions/releases of
>> a individual modules. For example, I want to be able to only checkout
>> the product module, or the page module.
>>
>> Sadly I can't change the directory layout. 
>>     
> [...]
>   
>> What can I do?
>>     
>
> Nothing. Your 'modules' are not really modular since they are mixed with each 
> other. Since SVN works on a per-directory layout but you would need to select 
> single files from within different directories there is nothing you can do.
>
> I could argue about why and how you could rearrange your code, but if you are 
> unable or unwilling, that doesn't help.
>
> Uli
>
>   
Hi Uli,

Someone suggested me to use 'authz' to define a set of directories for 
each module. For each set I would need a different user (which resembles 
a module).

That seems to work (?!)

gr. Roxlu

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

Re: Multiple repositories with mixed directories (newbie)

Posted by Ulrich Eckhardt <ec...@satorlaser.com>.
On Tuesday 27 February 2007 23:14, Diederick Huijbers wrote:
> [...] You see I've got 2 modules: page and product. The source files 
> are spread over multiple locations/sub-directories.
>
> The source for the page module is spread into:
> --------------------------------------------------------------
> css/modules/page
> js/modules/page
> HTML/modules/page
> ...etc....
>
>
> The source for the produduct module is spread into:
> --------------------------------------------------------------
> css/modules/product
> js/modules/product
> HTML/modules/product
>
>
> Now, I want to start using svn, so I can checkout revisions/releases of
> a individual modules. For example, I want to be able to only checkout
> the product module, or the page module.
>
> Sadly I can't change the directory layout. 
[...]
> What can I do?

Nothing. Your 'modules' are not really modular since they are mixed with each 
other. Since SVN works on a per-directory layout but you would need to select 
single files from within different directories there is nothing you can do.

I could argue about why and how you could rearrange your code, but if you are 
unable or unwilling, that doesn't help.

Uli

-- 
ML: http://subversion.tigris.org/mailing-list-guidelines.html
FAQ: http://subversion.tigris.org/faq.html
Docs: http://svnbook.red-bean.com/

Sator Laser GmbH
Geschäftsführer: Ronald Boers       Steuernummer: 02/892/02900 
Amtsgericht Hamburg HR B62 932      USt-Id.Nr.: DE183047360

**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.

**************************************************************************************

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


RE: Multiple repositories with mixed directories (newbie)

Posted by Méresse Christophe <ch...@nagra.com>.
 

> -----Original Message-----
> From: Diederick Huijbers [mailto:d.huijbers@apollo-ict.nl] 
> Sent: mardi, 27. février 2007 23:15
> To: users@subversion.tigris.org
> Subject: Multiple repositories with mixed directories (newbie)
> 
[snip]
> 
> Now, I want to start using svn, so I can checkout 
> revisions/releases of a individual modules. For example, I 
> want to be able to only checkout the product module, or the 
> page module.
> 
> Sadly I can't change the directory layout. (I've got my 
> reasons.... ) As this is probably a general problem more 
> people have I hope some of you could help me to fix this problem.
> 
> What can I do?

If you work on unix/linux, couldn't you solve the problem thanks to symbolic links ?

css
css/modules
css/modules/page -> ../../modules/page/css
css/modules/product -> ../../modules/products/css
HTML
HTML/modules
HTML/modules/product -> ../../modules/product/HTLM
HTML/modules/page -> ../../modules/page/HTML
index.php
js
js/modules
js/modules/product -> ../../modules/product/js
js/modules/page -> ../../modules/page/js
modules
modules/page
modules/page/css
modules/page/HTML
modules/page/js
modules/product
modules/product/css
modules/product/HTML
modules/product/js

Regards
Christophe

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