tags:

views:

220

answers:

1

Hi, I have a project, for example WORDPRESS. and I am use SVN.

I have following copies:

A. WP2.6 from wordpress.org

B. WP2.6, I modify some core files (add/del/change some files' code)

C. WP2.7 from wordpress.org

I would like update Version A to C and keep the changes of version B.

some of my changes maybe like that:

Version A code:

123 123

Version B code:

123 x 123

Version C code:

123 123 123

expected final version:

123 x 123 123

How can I make/apply patch to this project ? any faster/easier way if I have 100+ different files

maybe I thinking in wrong way. please suggest to make it right. thanks.

+1  A: 

(Simplistic Answer): There's no fully automatic way to do this - you will need to branch and merge, and merging will mean you have to look at your modifications, and test them.

  1. Start with (A) as /trunk, checked out into your working copy
  2. Create a "vendor" branch for WP2.6
  3. Copy (B) into the trunk. Take care to svn rm and svn mv deleted and renamed files, and commit to the trunk
  4. Switch the working copy to the (A)-WP2.6 branch
  5. Copy (C) into this branch (Again, don't forget svn mv and svn rm if needed), and commit
  6. Switch the working copy back to the trunk
  7. Merge from the WP2.6 vendor branch back into the trunk (this is where most of thehard work will be)
  8. Test it out to whatever degree of confidence you need before committing to the trunk
  9. Repeat for future releases


To illustrate the sort of difficulty that can't normally be solved automatically, consider this: in your example, the hoped-for final version could be either of these:

123 x 123 123
123 123 x 123
Brent.Longborough