If you have created a branch and are working with the files in that branch, when you 'update' it, is it updating/merging the code in the branch with the code in the trunk?
Also, when you ha开发者_JS百科ve commited your changes to the branch, how do you update the trunk with your changes? (since you commit the changes and have to switch to the trunk again?)
Any comments will be appreciated :)
Thanks,
When you update your working folder while working on a branch, you're updating with new changes in that branch, from the repository, not from the trunk.
So unless others are working in the branch with you, updating won't do anything.
To get your changes back into the trunk (or to get changes done to trunk into your branch), you need to use the merge operation.
You can read more about branching and merging in the subversion red-book under chapter 4. Branching and Merging.
First of all, in Subversion "branch" == "ordinary directory". You create directory "branches" in repository and say that it will contain branches, but Subversion doesn't distinguish this directory from any other. The same applies to "trunk", "tags", etc.
So, when you perform "update" on branch, you only update the directory.
As Lasse said, to get the changes into the trunk you should use "merge" operation.
No. It is practically not possible to "update" branch from the trunk. Branch is not like a working copy. You could, theoretically, merge all changes from trunk to branch, but this will create problems when committing your changes back to trunk.
This operation is called "reintegrate branch". It is actually a form of a merge. After that, the branch may be deleted.
精彩评论