Question

I have a project which was branched, and a bunch of files (F1) were moved into a different directory and changed (F2). Now, I want to merge the branch back to Trunk and keep revision history, but I want to keep both F1 and F2. Is there a way to do this in subversion?

Was it helpful?

Solution 2

I figured this out.

I need to check out the trunk revision that was originally branched. Then, I need to SVN COPY the F1 files to their respective new directories so the copies may become F2. Then, merge in a range of revisions from the branch to bring the F2 files up to date. Last, merge in a range of revisions to bring the F1 files up to date. Voila! Histories and everything are preserved, and I get both F1 and F2.

OTHER TIPS

What you're asking sounds contradictory to me. Maybe I just don't understand what you're asking.

If you just want to access F1 if the need arises, tag F1 before you merge the F2 branch.

If you merge the branch back into the trunk, the F2 files will overlay the F1 files. That's what a merge is.

If you want to keep both the F1 and F2 files, you would add the branch to the trunk and delete the branch. That way, the F1 and F2 files would both be available. I would do this by exporting the working copy of F2, sharing the working copy of F2, and deleting the original F2.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top