You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Miguel Rentes <mi...@efacec.pt> on 2008/01/10 14:59:02 UTC

Repository Layout

Hi!

I'm setting a SVN repository for a project team with whom I work and I'm 
having some difficulty setting the correct layout because my project is 
a very large one (with 3 different platforms: Unix, Linux and Windows) 
and I'm a SVN newbie. So, I would really appreciate every help I can get.

Here's my problem:

The source code for the project is intended to be the same across all 3 
platforms. So, I thought of creating a SVN repository with this source 
code that could be updated whenever any developer wants to change the 
code. But, I have some files and folders specific to the different 
platforms I use, and I want to add these files when I need to compile or 
test the code when I am working for that platform. For example:

the source code folders might be like this

- folder 1
 --- test.c
 --- test.h
 --- ...
- folder 2
 --- test2.c
 --- test2.h
 --- ...

If I'm working in Windows I need to have in the local working copy 
something like:

- folder 1
 --- test.c
 --- test.h
 --- MakefileWin <-- Makefile specific for Windows platform
 --- ... (other specific files for Windows)
- folder 2
 --- test2.c
 --- test2.h
 --- MakefileWin <-- Makefile specific for Windows platform
 --- ... (other specific files for Windows)

But, if I need to work in Linux, I have to be able to access a linux 
machine and have a different set of files, like:

- folder 1
 --- test.c
 --- test.h
 --- MakefileLinux <-- Makefile specific for Linux platform
 --- ... (other specific files for Linux)
- folder 2
 --- test2.c
 --- test2.h
 --- MakefileLinux <-- Makefile specific for Linux platform
 --- ... (other specific files for Linux)

and I have to do this having only one SVN repository that stores the 
source code. But what about these platform-specific files? They need to 
be in another repository? Do I need to create branches that have these 
specific files for every different platform I need to compile/test my 
project's code?

Any help would be great.

Thanks in advance,

Miguel Rentes

-- 
*Miguel Rentes*
Informatics Engineer
EFACEC - Electronic Systems <http://www.efacec.pt/>
Network Management
Email: miguel.rentes@efacec.pt <ma...@efacec.pt>
Phone: +351 229403388

Re: Repository Layout

Posted by Miguel Rentes <mi...@efacec.pt>.
Thanks everyone for your help on this problem I had. Right now we have 
the following layout:

folder1/Makefile (if target_platform=linux call makefile.linux, etc.)
folder1/makefile.linux
folder1/makefile.hpux
folder1/makefile.tru64
folder1/makefile.windows

If I have any trouble with this layout I make sure to tell you! Right 
now is working fine :D

Thanks again!

Best regards,

Miguel Rentes

Reedick, Andrew escreveu:
>   
>> -----Original Message-----
>> From: Paul [mailto:alabamapaul@gmail.com]
>> Sent: Thursday, January 10, 2008 12:35 PM
>> To: miguel.rentes@efacec.pt; users@subversion.tigris.org
>> Subject: Re: Repository Layout
>>
>> Miguel,
>> One possible solution would be to use the following structure:
>>
>> /Platform/Windows/folder1/MakefileWin
>> /Platform/Windows/folder1/OtherWindowsFiles
>> /Platform/Windows/folder2/MakefileWin
>> /Platform/Windows/folder2/OtherWindowsFiles
>> /Platform/Linux/folder1/MakefileLinux
>> /Platform/Linux/folder1/OtherLinuxFiles
>> /Platform/Linux/folder2/MakefileLinux
>> /Platform/Linux/folder2/OtherLinuxFiles
>> /Platform/Unix/folder1/MakefileUnix
>> /Platform/Unix/folder1/OtherUnixFiles
>> /Platform/Unix/folder2/MakefileUnix
>> /Platform/Unix/folder2/OtherUnixFiles
>> /Common/folder1/test.c
>> /Common/folder1/test.h
>> /Common/folder2/test.c
>> /Common/folder2/test.h
>>
>> Then have each of the platform specific make files to look for targets
>> in the appropriate ../../../Common  folder.
>>
>>     
>
> In my experience, bouncing between several directories is too strenuous
> for developers.[1]  Why not just stuff the platform specific stuff under
> subdirs and put the intelligence in the makefiles?
>
> folder1/Makefile (if target_platform=win32 call win32/Makefile...)
> folder1/win32/Makefile
> folder1/linux/Makefile
> folder1/unix/Makefile
>
> Keeping parallel directory trees in sync is also much more error prone
> than subdirs, especially if a major refactoring or code reorganization
> happens.  Given that Subversion doesn't have true renames yet, multiple
> directories could just be unnecessary pain multipliers.
>
>
> [1] All developers are lazy as evidenced by the amount of time and
> effort spent in making a computer do the work.  
>
>
>
> *****
>
> The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA622
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>
>   


-- 
*Miguel Rentes*
Informatics Engineer
EFACEC - Electronic Systems <http://www.efacec.pt/>
Network Management
Email: miguel.rentes@efacec.pt <ma...@efacec.pt>
Phone: +351 229403388

RE: Re: Repository Layout

Posted by "Reedick, Andrew" <jr...@ATT.COM>.

> -----Original Message-----
> From: Paul [mailto:alabamapaul@gmail.com]
> Sent: Thursday, January 10, 2008 12:35 PM
> To: miguel.rentes@efacec.pt; users@subversion.tigris.org
> Subject: Re: Repository Layout
> 
> Miguel,
> One possible solution would be to use the following structure:
> 
> /Platform/Windows/folder1/MakefileWin
> /Platform/Windows/folder1/OtherWindowsFiles
> /Platform/Windows/folder2/MakefileWin
> /Platform/Windows/folder2/OtherWindowsFiles
> /Platform/Linux/folder1/MakefileLinux
> /Platform/Linux/folder1/OtherLinuxFiles
> /Platform/Linux/folder2/MakefileLinux
> /Platform/Linux/folder2/OtherLinuxFiles
> /Platform/Unix/folder1/MakefileUnix
> /Platform/Unix/folder1/OtherUnixFiles
> /Platform/Unix/folder2/MakefileUnix
> /Platform/Unix/folder2/OtherUnixFiles
> /Common/folder1/test.c
> /Common/folder1/test.h
> /Common/folder2/test.c
> /Common/folder2/test.h
> 
> Then have each of the platform specific make files to look for targets
> in the appropriate ../../../Common  folder.
> 

In my experience, bouncing between several directories is too strenuous
for developers.[1]  Why not just stuff the platform specific stuff under
subdirs and put the intelligence in the makefiles?

folder1/Makefile (if target_platform=win32 call win32/Makefile...)
folder1/win32/Makefile
folder1/linux/Makefile
folder1/unix/Makefile

Keeping parallel directory trees in sync is also much more error prone
than subdirs, especially if a major refactoring or code reorganization
happens.  Given that Subversion doesn't have true renames yet, multiple
directories could just be unnecessary pain multipliers.


[1] All developers are lazy as evidenced by the amount of time and
effort spent in making a computer do the work.  



*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA622


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


Re: Repository Layout

Posted by Paul <al...@gmail.com>.
Miguel,
One possible solution would be to use the following structure:

/Platform/Windows/folder1/MakefileWin
/Platform/Windows/folder1/OtherWindowsFiles
/Platform/Windows/folder2/MakefileWin
/Platform/Windows/folder2/OtherWindowsFiles
/Platform/Linux/folder1/MakefileLinux
/Platform/Linux/folder1/OtherLinuxFiles
/Platform/Linux/folder2/MakefileLinux
/Platform/Linux/folder2/OtherLinuxFiles
/Platform/Unix/folder1/MakefileUnix
/Platform/Unix/folder1/OtherUnixFiles
/Platform/Unix/folder2/MakefileUnix
/Platform/Unix/folder2/OtherUnixFiles
/Common/folder1/test.c
/Common/folder1/test.h
/Common/folder2/test.c
/Common/folder2/test.h

Then have each of the platform specific make files to look for targets
in the appropriate ../../../Common  folder.

Hope this helps,
Paul


On Jan 10, 2008 8:59 AM, Miguel Rentes <mi...@efacec.pt> wrote:
>
>  Hi!
>
>  I'm setting a SVN repository for a project team with whom I work and I'm
> having some difficulty setting the correct layout because my project is a
> very large one (with 3 different platforms: Unix, Linux and Windows) and I'm
> a SVN newbie. So, I would really appreciate every help I can get.
>
>  Here's my problem:
>
>  The source code for the project is intended to be the same across all 3
> platforms. So, I thought of creating a SVN repository with this source code
> that could be updated whenever any developer wants to change the code. But,
> I have some files and folders specific to the different platforms I use, and
> I want to add these files when I need to compile or test the code when I am
> working for that platform. For example:
>
>  the source code folders might be like this
>
>  - folder 1
>   --- test.c
>   --- test.h
>   --- ...
>  - folder 2
>   --- test2.c
>   --- test2.h
>   --- ...
>
>  If I'm working in Windows I need to have in the local working copy
> something like:
>
>  - folder 1
>   --- test.c
>   --- test.h
>   --- MakefileWin <-- Makefile specific for Windows platform
>   --- ... (other specific files for Windows)
>  - folder 2
>   --- test2.c
>   --- test2.h
>   --- MakefileWin <-- Makefile specific for Windows platform
>   --- ... (other specific files for Windows)
>
>  But, if I need to work in Linux, I have to be able to access a linux
> machine and have a different set of files, like:
>
>  - folder 1
>   --- test.c
>   --- test.h
>   --- MakefileLinux <-- Makefile specific for Linux platform
>   --- ... (other specific files for Linux)
>  - folder 2
>   --- test2.c
>   --- test2.h
>   --- MakefileLinux <-- Makefile specific for Linux platform
>   --- ... (other specific files for Linux)
>
>  and I have to do this having only one SVN repository that stores the source
> code. But what about these platform-specific files? They need to be in
> another repository? Do I need to create branches that have these specific
> files for every different platform I need to compile/test my project's code?
>
>  Any help would be great.
>
>  Thanks in advance,
>
>  Miguel Rentes
>
>
> --
>  Miguel Rentes
>  Informatics Engineer
>  EFACEC - Electronic Systems
>  Network Management
>  Email: miguel.rentes@efacec.pt
>  Phone: +351 229403388

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

RE: Repository Layout

Posted by "Roth, Pierre" <pi...@covidien.com>.
> I'm setting a SVN repository for a project team with whom I 

> work and I'm having some difficulty setting the correct 

> layout because my project is a very large one (with 3 

> different platforms: Unix, Linux and Windows) and I'm a SVN 

> newbie. So, I would really appreciate every help I can get.

> 

> Here's my problem:

> 

> The source code for the project is intended to be the same 

> across all 3 platforms. So, I thought of creating a SVN 

> repository with this source code that could be updated 

> whenever any developer wants to change the code. But, I have 

> some files and folders specific to the different platforms I 

> use, and I want to add these files when I need to compile or 

> test the code when I am working for that platform. For example:

> 

> the source code folders might be like this

> 

> - folder 1

> --- test.c

> --- test.h

> --- ...

> - folder 2

> --- test2.c

> --- test2.h

> --- ...

> 

> If I'm working in Windows I need to have in the local working 

> copy something like:

> 

> - folder 1

> --- test.c

> --- test.h

> --- MakefileWin <-- Makefile specific for Windows platform

> --- ... (other specific files for Windows)

> - folder 2

> --- test2.c

> --- test2.h

> --- MakefileWin <-- Makefile specific for Windows platform

> --- ... (other specific files for Windows)

> 

> But, if I need to work in Linux, I have to be able to access 

> a linux machine and have a different set of files, like:

> 

> - folder 1

> --- test.c

> --- test.h

> --- MakefileLinux <-- Makefile specific for Linux platform

> --- ... (other specific files for Linux)

> - folder 2

> --- test2.c

> --- test2.h

> --- MakefileLinux <-- Makefile specific for Linux platform

> --- ... (other specific files for Linux)

> 

> and I have to do this having only one SVN repository that 

> stores the source code. But what about these 

> platform-specific files? They need to be in another 

> repository? Do I need to create branches that have these 

> specific files for every different platform I need to 

> compile/test my project's code? 

> 

You could use the svn:externals property... Please refer to "Externals
Definitions" chapter of subversion online book
http://svnbook.red-bean.com/en/1.4/svn-book.html
<http://svnbook.red-bean.com/en/1.4/svn-book.html>