...

Open source softwares - Apache SVN(Sub Version)

Back to Course

Lesson Description


Lession - #1561 SVN Branching


#### When do you need branching? You may need to adopt branching in numerous different scripts. Let us assume that on a day to day base you use nimble methodologies similar as extreme programming or scrum and you have eventually released a reasonably complex design with Version1.0.0.0. Couple of days after the release, you get a request for a new point that must go as Version1.1.0.0. You envision it'll take couple of weeks to get that feature coded, tested and released. Meanwhile, simple variations and patches are requested on a day to day base in the Version1.0.0.0. Basically, with the changing business needs you're needed to do a deployment every other day or so i.e. your deployment cycle is 2 days or less. With a team of 10 developers it'll be a nightmare in the absence of a proper branching strategy. Trunk, branch, and tag are the 3 main divisions in subversion depository. #### Trunk The code in trunk is always maintained as close to release state as possible. Any developer making changes to the trunk must be absolutely certain that his or her part can be coded, tested and is ready to deploy within 2 days( can vary depending on your length of deployment cycle>
. still, they aren't allowed to directly change the code in the trunk, If it takes further than 2 days. They've to produce a branch. #### Branch Developer Branch Each developer must create his or her own branch if their code will take further time to program than your normal deployment cycle. It's the responsibility of the developer to regularly( timeframe depends on your development environment>
merge changes from trunk to his branch. #### Feature branch Create a feature branch if 2 or further developers are going to work on a new feature that will take considerable time to complete. It's the responsibility of the team lead to combine changes from trunk to this feature branch on a regular basis. It's always beneficial to merge changes from box constantly. Because, after a couple of days conflict between box version and branch version can get out of hand and merging will virtually be impossible. When the developer branch or feature branch is ready for release, merge changes back from the branch to trunk. #### Tags Tag is similar to branch. When you create a branch simply rename the folder from branch/ branches to tag. I always use markers to label a release whenever a new release version is deployed. This will come in handy if a very minor patch has to be made on the release version when your trunk is temporarily dirty. Ideally, you don't combine from box to the label.  Eventually, remember that there's no ideal branching and merging strategy. It enough much depends on your unique developmentenvironment.However, I would like to hear about that, If you have any other strategy. ```plaintext


```