user1181858
user1181858

Reputation: 47

Tortoise SVN merge

I have a file a.c in the branch branch_1 with below versions.

Previous version: 10 Next version : 20 Current version :25 My working copy is branch_2

I want to merge the difference between versions 20 and 10 in branch_1 to working copy only for a.c file.

How can I merge it using tortoise svn?

I had written below batch file to work manually execute the bat file, but I want to do this with tortoise svn + external diff program.

    @ECHO OFF

    set svn_url="https://Project/branches/"

    SET DIFF3="C:\Program Files\Beyond Compare 3\BComp.exe"
    SET BRANCH=%1
    SET FOLDER=%2
    SET FILE=%3
    SET NV=%4
    SET PV=%5
    svn co %svn_url%/%BRANCH%/%FOLDER%/ --depth empty

    cd %FOLDER%
    svn update -r %NV% %FILE%
    del %FILE%_%NV%
    rename %FILE% %FILE%_%NV%

    svn update -r %PV% %FILE%
    del %FILE%_%PV%
    rename %FILE% %FILE%_%PV%

    %DIFF3% %FILE%_%NV% D:\Projct\%FOLDER%\%FILE% %FILE%_%PV%

pause

Upvotes: 1

Views: 304

Answers (1)

gbjbaanb
gbjbaanb

Reputation: 52689

I'm not sure what current version 25 means when next version is 20.

But to merge in tortoise, right click on your working copy, either a directory or a file, select merge. Choose the source file/directory you want to merge changes from and pick the revisions from the dialog that pops up. Its really simple.

Upvotes: 1

Related Questions