1

I checkout other people's branch. Inside, I do

 svn merge http://repo.com/apps/service/branches/my_branch http://repo.com/apps/service/branches/your_branch 

What is the correct way to do svn merge in cli? The command above gives

Merging differences between repository URLs into '.': G . Recording mergeinfo for merge between repository URLs into '.': U . 

when I do svn commit -m "xxx". It seems nothing happened. What is the correct to merge 1 branch?

1 Answer 1

2

I expect you want to merge changes from your_branch into my_branch? please update your question accordingly, it is not clear what you want to merge from where.

You need to have a checked out working copy to merge into. Also I expect it is your current directory as otherwise the merge command fails. However, it is not clear to which SVN branch this Workingcopy points so please state this as well. I expect this is my_branch in your case.

You performed a "2-URL merge" which is: showing you the difference between my_branch and your_branch and merge them into working copy (my_branch). In the result it will be the same as your_branch undoing all changes done on my_branch (my_branch+ [your_branch-my_branch] = your_branch).

What you usually want is a "complete merge". Just state the branch you want to merge from and the changes will be applied to your working copy:

svn merge http://repo.com/apps/service/branches/your_branch

This will show up all changes from your_branch in my_branch

To complete the list: the 3rd merge is "cherry-pick merge" and looks like "complete merge" but selects certain revisions to merge.

Sign up to request clarification or add additional context in comments.

3 Comments

On server, I make a branch. My friend makes a branch. I checkout his branch into my machine. I merge it with my branch and check into friend's branch. Basically, I merge on someone's behalf.
I think I was doing your_branch+ [your_branch-my_branch], which is not correct.
if you checked out "your_branch", go to the workingcopy and call "svn merge repo.com/apps/service/branches/my_branch" this should merge your changes into "your_branch"

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.