views:

62

answers:

2

I think one method is keep one code base, when export, manually add or not add these additional files per release requirement. But it require you to remember doing this each time export a copy, which is easy to forget.

I created a branch for the project in SVN with these files included, but problem is each time i change the trunk, i need to do it again in the branch, or a merge. How can i get desired release without needs to maintain two code base? Or is there a way to auto sync specified part files of two projects (trunk,branch)? Any suggestion?

+1  A: 

I would just keep all the files in a single branch, and tell my release mechanism which files should be included. Without knowing how your release process works, it's hard to say more...

Thomas
i use tortoisesvn to export a copy of repository when i need a release, have no idea on "tell my release mechianism ...", what does it mean?
Edward
It means have a build script or other tool that "builds" the final application/project. This build script (could be make or cmake or ant or maven, a customer shell script etc.) would have either two versions, one for project A, one for project B or options which would tell it to do something different when packaging the source for deployment. I use this option often. The build script can take options which include whole directory trees or not, deploy server applications to this or that server etc.
SuperMagic
does it mean i need another tool to achieve this function? eclipse?
Edward
Depending on your requirements, plain old BAT files might work for you.
Thomas
+1  A: 

Going with a single branch/trunk model is sure to lead to pain and misunderstandings at crucial times. As painful as it is, you need to have two branches... or possibly set up the differences as a separate project via svn:externals. That way you can be sure to get exactly the version you want and nothing more.

A good build process would be useful here. Within web2project, we use a pretty robust Phing* script - detailed here: http://caseysoftware.com/blog/the-joel-test-redux-web2project - to handle pulling from a tag or our trunk as necessary. The nice thing is that we run exactly one command (and then specify a version) to come up with a new package for release.

  • Phing is just Ant for the PHP world. The concepts are identical and the syntax is very similar.
CaseySoftware