Working with svn

When you manage a project with svn there are a lot of things to consider: how you create the repository, what external resources will be imported in the repository. Basically  it’s a constant job on how to organize things better to keep developers happy.

After lots of try/fail cycles i came to the conclusion that for linux distribution the best approach would be a tree like this

server
-> bzip2
* trunk
* tags
* branches
-> atk
* trunk
* tags
* branches
-> tfm-filesystem32
* trunk
* tags
* branches
server64
-> bzip2
* trunk
* tags
* branches
-> atk
* trunk
* tags
* branches
-> tfm-filesystem64
* trunk
* tags
* branches

What is wrong with this structure? In time a developer will update bzip2 from server 32 tree but will forget or won’t have the time to update server64 tree. So the trees will not stay in sync. And this is bad because it might happen that the projects will have different sources.

What can be done? Use svn:external declarations. First idea was to create a common tree and create externals from both server and server64. But this way we will have 3 trees and lot of work to do. And it will become hard to manage. Another approach was needed. We decided that server is the main tree. In the server64 tree we declared bzip2 to be external and pulled from 32 bit tree.

This way if a developer commits a change will go in both trees simultaneously.

How to use svn: external? Let’s take for example bzip2 from server64

svn del bzip2; svn commit ; svn pedit svn:externals . ; svn up ; svn commit

and when editing svn external you should add a like like this:

bzip2 https://svn.tfm.ro/tfm/server/bzip2


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.