Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Diff tab and syntax

An Nguyen May 9, 2022

Sourcetree version: 3.4.8

Windows 10.

 

I have tried to play with all of the different escaped characters and cannot get what I want.

 

Here is the current config:

```

[diff]
    tool = sourcetree
[difftool "sourcetree"]
    cmd = 'C:/TwinCAT/3.1/Components/TcProjectCompare/TcProjectCompare.exe' //filel \"$REMOTE\" //filer \"$LOCAL\"
    keepbackup = false
    trustExitCode = true

[merge]
    tool = sourcetree
[mergetool "sourcetree"]
    cmd = "'' "
    keepbackup = false
    trustExitCode = true
'''
This launches TcCompare correctly, however the directory path is some random temp folder location. I have another section in the config so that the diff tool opens with other program using git bash (I guess).

```

[diff]
    tool = TcProjectCompare
[difftool "TcProjectCompare"]
    cmd = TcProjectCompare /filel $REMOTE /filer $LOCAL /dl \\\" Current Code (On BitBucket!) \\\" /dr \\\" Previous Code \\\" /sc
    keepbackup = false
    trustExitCode = true

[merge]
    tool = TcProjectCompare
[mergetool "TcProjectCompare"]
    cmd = TcProjectCompare /filel $LOCAL /filer $REMOTE /filem $MERGED /dl \\\" Merged To Branch And Merge Result \\\" /dr \\\" Merged From \\\" /sc
    keepbackup = false
    trustExitCode = true
'''
It took me awhile to figure out the escape sequence for TcProjectCompare. I tried doing the same for sourcetree, however the output is not predictable. Example:
cmd = 'C:/TwinCAT/3.1/Components/TcProjectCompare/TcProjectCompare.exe' //filel \"$REMOTE\" //filer \"$LOCAL\" //dl \\\" test \\\" //sc
resulted in only showing @ " on the left side (dl = directory left). I expect it to show "test" on the left side. Any tip/guidance on syntax of git config and how that work with the argument settings? 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events