Reputation: 625
I modified the test.txt in branch, and have six committed revisions, they are 1, 2,3,4,5 and 6.
Now, I want to merge those modifications from branch to trunk, I use the below command:
$cd trunk-working_copy
$svn merge -r 2:6 http://XXX/branch/test.txt@1,
How to understand this command, does the below is right?
r2 diff with r1 ,then apply
r3 diff with r1 ,then apply
r4 diff with r1 ,then apply
r5 diff with r1 ,then apply
r6 diff with r1 ,then apply
Upvotes: 1
Views: 6665
Reputation: 13347
since i cannot put this as a comment
"
The Key Concepts Behind Branching
You should remember two important lessons from this section. First, Subversion has no internal concept of a branch—it knows only how to make copies. When you copy a directory, the resultant directory is only a “branch” because you attach that meaning to it. You may think of the directory differently, or treat it differently, but to Subversion it's just an ordinary directory that happens to carry some extra historical information.
Second, because of this copy mechanism, Subversion's branches exist as normal filesystem directories in the repository. This is different from other version control systems, where branches are typically defined by adding extra-dimensional “labels” to collections of files. The location of your branch directory doesn't matter to Subversion. Most teams follow a convention of putting all branches into a /branches directory, but you're free to invent any policy you wish.
"
Upvotes: 1
Reputation: 13549
The command is merging changes from versions 2 to 6 of branch to trunk.
If you then do svn st
in trunk-working_copy
, you will notice the files that have been modified. You will then need to do a svn commit
for the changes to actually appear in the trunk.
Basic merging in svn is explained in detail here.
Upvotes: 1