tags:

views:

163

answers:

2

I have copied /trunk/project_a to /branches/project_a/test_1. However, I have not yet committed the newly created branch. Then I did some changes in the working copy which I originally intended to commit with the newly created branch. However, after I was done, it seems better to commit those changes into the trunk. (I could then commit the branch without the changes and merge them from the trunk or I just revert the branch creation and branch anew. That doesn't really matter.)

My question: Is there a way to merge uncommitted changes (and from an uncommitted branch) in SVN?

A: 

You could try to switch your working copy to the other branch and then commit the changes.

As far as I know, there is no way to merge uncommitted changes. svn wants you to specify a range of revisions to merge so that it can compute the diff to apply, and you can't do that without committing the changes first.

Ori Pessach
But I cannot switch an uncommitted branch, can I?
sbi
+1  A: 

I think in your case it's easiest to just commit everything where it is and merge back to trunk. But if you're really desperate you could try to create a patch file, apply it to trunk and revert your changes in the branch.

Jim T
In the end, I went the patch file approach. Too bad, I thought SVN would provide a way to extract and merge uncommitted changes.
sbi