SVN - How to merge branches back to trunk

Hi experts,

I have a drupal project that I have been working on and storing in an SVN repository. The project was initially based on Drupal 5 but I have had to upgrade to Drupal 6. I'm new to branching/merging/tagging in SVN so I need some help.

I had trunk, and I created a new branch called Drupal 5, just to keep it for history sake. I then also created a Drupal 6 branch, where I upgraded Drupal and all my contrib modules and themes and custom code to D6.

Now trunk is all my old D5 code, as is the D5 branch. Should I be pulling my D6 code back in to trunk? How do I do this? I am using Eclipse on Windows but can access it via a unix shell if that is going to be easier.

Regards,
Michael
LVL 10
mstrelanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

junipllcCommented:
I, too, use svn (and with CVS and now git for checkout of some of the code directly from D.O.). I haven't actually had the need to utilize branches just yet, but I know I will, so this will be a learning experience for me.

I do know, however, that the information we'll need is here:

http://svnbook.red-bean.com/en/1.1/ch04s02.html

Just from a Drupal perspective, I think merging it back in wouldn't work, since they are different versions and don't really share any code. So (and as a test) you could tag the current trunk branch by basically copying the current state of the trunk into another location (I have branches, tags, and trunk in my svn root, so I would use tags), then "svn rm" (delete) the trunk. Then just take the branch you're using and pop it into trunk.

I think it's really a matter of personal preference about how you want to organize things. But if all works according to plan you can just "svn update" after doing that and your new working copy would reflect the new D6 code.

The trunk, as I understand it, "should" be the working development area, the "branches" should be parallel code that has a common start, and "tags" are typically the releases that go to the live site.

It's early in the morning here, so I hope I'm making sense. But I wanted to hop on the question since I saw you didn't get any replies yet. And if you come up with a solution (with our help) then it could be invaluable for future searchers since I don't think there's a heck of a lot of standard information out there about using Drupal with SVN...although it's amazingly important.

As always, back up everything, and test, test, test :)

I'm going to do some reading on the subject to see what else I can come up with.

Good luck!

Mike
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mstrelanAuthor Commented:
Great, thanks. Checked out trunk, deleted everything, committed. Exported D6 branch, imported it to trunk, committed again.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.