Search code examples
svntortoisesvn

How to apply changes of one specific subversion revision to file in trunk?


In my SVN there's a 3rd party code library. Over time I did some personal modifications, which are also stored as revisions. Now I downloaded the most recent version of this library. I've committed the new version in my SVN overwriting the customized old version.

To get my customizations into the new code I'd like to apply the same modifications to the new version. I've never created a branch and I'd like to manually select which revisions I want to take over.

Is there a way to get a patch-file from a revision and apply that patch-file to the newest version of the file so I then can check (before committing) if the patch was merged correctly?

I am using and preferring TortoiseSVN but command-line-svn is also ok.

Thanks.


Solution

    • In TSVN context menu you have "Create patch" + "Apply patch"

    Context menu

    but I guess, you selected "not perfect" (to put it mildly) workflow with upstream and own changes in one branch and "repeat yourself" monkey-job of re-appling patches. You can move to Vendor Branches or at least try cherrypick merges instead of patching (may work /not tested!!!/ even in single branch) for producing more clean history