Setting up custom merge tool in SourceTree - Code compare

I'm trying to setup Devart Code compare as the merge tool.

The documentation of Devart Code compare states that it required the following:

/TF="path to remote" /MF="path to local" /BF="path to base" /RF="path to merged"

When I translate this to the argument to be entered in Sourcetree, whtis would be:

/TF="$REMOTE" /MF="$LOCAL" /BF="$BASE" /RF="$MERGED"

However, when I that what is actually being executed, I see that the command line is (I'm trying to merge my Gitignore file):

"c:\Program Files\Devart\Code Compare\CodeMerge.exe" "C:/Program Files (x86)/Git/TF=./.gitignore.REMOTE.1120.gitignore" "C:/Program Files (x86)/Git/MF=./.gitignore.LOCAL.1120.gitignore" "C:/Program Files (x86)/Git/BF=./.gitignore.BASE.1120.gitignore" "C:/Program Files (x86)/Git/RF=.gitignore"

The backslahes seem to have been replaced with the paths to Git. When I try to escape the backslag with another backslash, I get:

"c:\Program Files\Devart\Code Compare\CodeMerge.exe" "//TF=./.gitignore.REMOTE.1120.gitignore" //MF=./.gitignore.LOCAL.1120.gitignore //BF=./.gitignore.BASE.1120.gitignore //RF=.gitignore"

which doesn't work either.

Is there anything I can do to correct the argument that needs to be passed as forward slash?

3 answers

Hi Robert

This setting will work:

Diff command: C:\Program Files\Devart\Code Compare\Codemerge.exe

Arguments: -MF=\"$LOCAL\" -TF=\"$REMOTE\" -BF=\"$BASE\" -RF=\"$MERGED\"

Try using the other type of slash to escape:

\/TF=...

Hi Seth, thanks for your response. I tried that already too, but no luck so far.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

799 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you