I have multiple projects in SVN. Each of these project sits in it's own trunk and branched for releases.
And there is a shared code which is used in each project. The question is what is the best way to handle the code.
Let me give couple of scenarios and the issues related to them
a) Put the shared code in separate trunk (or repository) and use svn:external.
In the case if we branched some of projects, there will be two problems:
As I understand there is one work around. As soon as we branch, we can modify svn:external to pick up exact revision of shared code. However, there are again two pitfalls:
b) Another solution is to branch shared code when the project is branched and change external to point to bracnhed copy of shared code.
Am I missing anything? Is there any reasonable way to handle this?
It can manage several projects and track progress, bugs, Test cases, etc.. There are several packages as well. If you are not a opensource developer, take a look at this as well. Show activity on this post.
Personally i keep a separate repository then use the [http://svnbook.red-bean.com/en/1.0/ch07s03.html svn:externals] attribute.
SVN Externals allow for you to link to other repositories (even ones you dont run e.g. the smarty subversion repo) when you run an svn update both your project and the external repo will be updated.
with SVN externals you can also link to specific revisions using somethign like http://path-to-project.com/svn/thing -r1234
for releases and other things that you need to keep static
Best practice IMHO is to always specify a revision then update the revision number as you make changes to the shared library so that you can keep track of WHY you updated this data. also keeps everything sane when you tag or branch the main project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With