9

I was working on the trunk recently and the changed I did I thought others might need them so I created a patch just before committing.

Now a fellow dev who was working on a branch (which comes from the trunk a couple of weeks back) needs those changes to go on a new server.

I'm trying to apply my patch with Tortoise SVN but it does'nt seam to like the disparities of my working copies. I have :

  • My trunk at : D:\SVN\Trunk
  • The branch at : D:\SVN\Branches\TheBranchINeedToPatch

Am I trying to do something impossible ? Is there something I'm missing ?

Can I apply a trunk patch to a branch working copy ?

Thanks for the help!

Sébastien Richer
  • 1,642
  • 2
  • 17
  • 38

1 Answers1

7

Perquisite: Let's say you are currently working on the branch. To check that use svn info. The url should be pointing to your branch

Then you can merge the changes from trunk to your branch by using merge command

svn merge -r FROM_REVISION:REQUIRED_REVISION url/to/trunk .
or
svn merge -r 26:32 url/to/trunk .

This will bring all change sets from rev 26 to 32 of trunk into your branch.

Ah, there already is a discussion on how to do this with TortoiseSVN: Using TortoiseSVN how do I merge changes from the trunk to a branch and vice versa?

Community
  • 1
  • 1
pyfunc
  • 65,343
  • 15
  • 148
  • 136
  • +1, merge when you want to get something to a different branch. – Joshua McKinnon Dec 01 '10 at 22:53
  • Ok thanks, I merged my trunk onto my branch selecting the specific revisions. Thanks for the help! – Sébastien Richer Dec 02 '10 at 15:47
  • OK, how can I do that **without** having access to trunk? User who has the access to trunk only gave me the **patch** he created for trunk. – izogfif Nov 02 '12 at 10:05
  • @izogfif I don't understand. You want to apply a patch to /trunk and you don't have Read / Write access? – bahrep Nov 02 '12 at 10:31
  • This worked for me although I noted that changes that resulted in revision '26' are NOT included. IE: Rev 26 should correspond to the current 'state' of the target branch. – Peter L Sep 30 '14 at 04:43