Can I (and how to) apply a patch created from trunk to a branch?
Asked Answered
A

1

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!

Aesthesia answered 1/12, 2010 at 22:7 Comment(0)
M
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?

Mousterian answered 1/12, 2010 at 22:12 Comment(5)
+1, merge when you want to get something to a different branch.Brainbrainard
Ok thanks, I merged my trunk onto my branch selecting the specific revisions. Thanks for the help!Cabman
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.Sapient
@Sapient I don't understand. You want to apply a patch to /trunk and you don't have Read / Write access?Tot
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.Preliminary

© 2022 - 2024 — McMap. All rights reserved.