quick svn question

Joined
Apr 4, 2003
Messages
836
To my understanding, when I create a branch, I can edit and commit code on that branch with no effect on the trunk until I merge later on... but if someone edits code in the trunk, when i svn update my branch, i will have to merge those changes into my code.

is my understanding correct? please correct me where i am wrong.

thanks.
 
To my understanding, when I create a branch, I can edit and commit code on that branch with no effect on the trunk until I merge later on... but if someone edits code in the trunk, when i svn update my branch, i will have to merge those changes into my code.

is my understanding correct? please correct me where i am wrong.

thanks.

If you're on Branch B, and someone edits something in the HEAD, you won't get those changes in your branch copy if you update. If you want those changes you will have to merge in changes from HEAD or a different branch.
 
thanks for correcting me.

when i merge with the head revision, does it affect the trunk or only my branch?

Depends on if you're:
- merging your branch into the trunk (your changes are merged with trunk)
- or if you're merging FROM the trunk INTO the branch (changes since you branched would be merged from trunk into the branch).
 
what i want is the second option. is there a SVN method to accomplish this?

essentially what is happening is that we have to perform some concurrent development on the same project. one developer doesn't know enough about a specific technology to fix merging problems when they arise. instead,he is leaving stub functions for me to fill in. however, i also need to make minor changes throughout his code to suport this technology. we decided to make my part a branch and his part the trunk. i would like, on a daily basis, to merge his changes into mine.
 
you use the svn merge command for both operations.

Merging computes the diff between one revision and another along one line of development, and applies that to the working copy.

Merging the trunk into the branch starts with a working copy of the branch, computes the diff of the trunk from where the branch started to where the trunk is now, then applies that difference to the working branch copy.

Merging the branch to the trunk is the same thing, it gets the difference between the start and end of the branch, then applies that to the working trunk copy.
 
Back
Top