sábado, 24 de janeiro de 2009

How to mantain several branches tracking a trunk?

Last few years, I was working inside some projects (Umit and others).
When you work with other peoples commits are limited so the best idea is create a branch. But how I do that? From last few years I was thinking that svn doesn't have support branches, and the way to do that it's just copy the trunk and make "svn merge .." and keep update the branch.
Last month a guy named Guilherme, show me how I really make a branch inside Subversion.
It's not easy if you're working with old tracking. It's the reason of the post.

I would like to talk about:
- branches
- tags

There was a application 'svnmerge' available to create branches. So it keep branch tracking changes on trunk. That's really cool. Advantages?

How svnmerge works with old versions?

First you need to initialize the branches: svnmerge init PATH ( You should do it first at branch, later at trunk)


You can rollback some merges, sample: svnmerge rollback -M r100-120.

The team will take the real avantages after integration, or if you create svnmerge at begin.

In your branch, you can merge easy way: svnmerge merge, and optionally we can specify the revision interval, between revision x and revision y, -rx-y.

At trunk you should do same thing, to push branch changes:
svnmerge merge -S brach_directory

Easy? :D

Thanks Guilherme, it's really cool.