You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Stefaniuk Marcin <Ma...@disc.com.pl> on 2008/10/15 13:55:03 UTC

One source code structure but two SVN repositories

Is it possible to has one repository with source code but also visible in different structure by another "SVN repository"?

Let me explain my concept. In my company we are working on changing source code layout. We are adjusting it to Maven guidelines. So each component has added src/main/java folder structure before module sources itself. Because whole process will take few months my idea is to keep original structure of sources but create second repository mapped to first one using mod_rewrite. There will be several folders mapped in such manner. All write commands I suppose that can be passed using svn_mod_proxy.

Structures overview looks as follows:

master-root
+- component1
|  +- file1
|  +- file2
|  +- ...
+- component2
|  +- ...

slave-root
+- component1
|  +- src
|     +- main
|        +- java
|           + file1
|           + file2
|           + ...
+- component2
|  +- src
|     +- main
|        +- java
|           + ...

Mapping of folders can looks as follows:
master-root/component1 <-> slave-root/component1/src/main/java
master-root/component2 <-> slave-root/component2/src/main/java

Is it possible and reliable using SVN 1.5?

Best regards
Marcin Stefaniuk


Re: One source code structure but two SVN repositories

Posted by Tyler Roscoe <ty...@cryptio.net>.
On Wed, Oct 15, 2008 at 03:55:03PM +0200, Stefaniuk Marcin wrote:
> Is it possible to has one repository with source code but also visible
> in different structure by another "SVN repository"?

Have you looked into svn's externals?

tyler

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

Re: One source code structure but two SVN repositories

Posted by David Weintraub <qa...@gmail.com>.
If you are doing work that will take more than a few days to do, it
really should be branched. Subversion does handle file moves and
copies, so it can still handle tracking the changes between two *.java
files on different branches even if they now sit in two different
directories.

So, the best bet is to create a Maven branch, do your reconfiguring
there, and then once you get everything the way you want, move those
changes back to the trunk.

The only question is how Subversion handles merging directory
differences between two branches. If Subversion can't handle merging
directory differences, you might have some trouble moving your changes
off of the Maven branch and back onto trunk.

--
David Weintraub
qazwart@gmail.com



On Wed, Oct 15, 2008 at 9:55 AM, Stefaniuk Marcin
<Ma...@disc.com.pl> wrote:
> Is it possible to has one repository with source code but also visible in
> different structure by another "SVN repository"?
>
>
>
> Let me explain my concept. In my company we are working on changing source
> code layout. We are adjusting it to Maven guidelines. So each component has
> added src/main/java folder structure before module sources itself. Because
> whole process will take few months my idea is to keep original structure of
> sources but create second repository mapped to first one using mod_rewrite.
> There will be several folders mapped in such manner. All write commands I
> suppose that can be passed using svn_mod_proxy.
>
>
>
> Structures overview looks as follows:
>
>
>
> master-root
>
> +- component1
>
> |  +- file1
>
> |  +- file2
>
> |  +- …
>
> +- component2
>
> |  +- …
>
>
>
> slave-root
>
> +- component1
>
> |  +- src
>
> |     +- main
>
> |        +- java
>
> |           + file1
>
> |           + file2
>
> |           + …
>
> +- component2
>
> |  +- src
>
> |     +- main
>
> |        +- java
>
> |           + …
>
>
>
> Mapping of folders can looks as follows:
>
> master-root/component1 <-> slave-root/component1/src/main/java
>
> master-root/component2 <-> slave-root/component2/src/main/java
>
>
>
> Is it possible and reliable using SVN 1.5?
>
>
>
> Best regards
>
> Marcin Stefaniuk
>
>

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


Re: One source code structure but two SVN repositories

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 15, 2008, at 08:55, Stefaniuk Marcin wrote:

> Is it possible to has one repository with source code but also  
> visible in different structure by another “SVN repository”?
>
> Let me explain my concept. In my company we are working on changing  
> source code layout. We are adjusting it to Maven guidelines. So  
> each component has added src/main/java folder structure before  
> module sources itself. Because whole process will take few months  
> my idea is to keep original structure of sources but create second  
> repository mapped to first one using mod_rewrite. There will be  
> several folders mapped in such manner. All write commands I suppose  
> that can be passed using svn_mod_proxy.

Sorry, it doesn't work that way.


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


RE: One source code structure but two SVN repositories

Posted by Stefaniuk Marcin <Ma...@disc.com.pl>.
-----Original Message-----
From: Nick Stolwijk [mailto:nick.stolwijk@gmail.com]
Sent: Wednesday, October 15, 2008 6:44 PM
To: Stefaniuk Marcin
Subject: Re: One source code structure but two SVN repositories

Maybe you can try svn:externals, thus mapping one folder in one
repository to a folder in the other. Each commit will also go to the
original repository.

See the SVN Book for more details:
http://svnbook.red-bean.com/en/1.0/svn-book.html#svn-ch-7-sect-3
It looks very promising.

What can I do with files (we have around hundred of them)? Mod_redirect is not working at all for SVN? If I resign on writing (read only) on "externalized" folders and files can I use mod_redirect with files mapping?

Best regards
Marcin Stefaniuk