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

Trying to get SourceTree working with the TwinCat ProjectCompare tool

Mark van der Lee November 6, 2020

I am trying to get SourceTree working with the TwinCat ProjectCompare tool...

When using the TwinCat ProjectCompare using a shortcut, bat file or command prompt everything works fine. In these cases I am using the following command for example:

C:\TwinCAT\3.1\Components\TcProjectCompare\TcProjectCompare.exe /filel C:\Users\BPA\AppData\Local\Temp\tmp5968.tcpou /filer C:\users\bpa\appdata\local\temp/aqsvxz_cm_casecompacting.tcpou /dl left /dr right /sc

 

When I use the same format in SourceTree external compare tool it behaves not like it should. In this case i am getting the message 'File c:/program files/git/filel does not exist!'.

It looks like SourceTree is doing something with the formatting of the forward slash or something like that.

Does anyone have an idea how to fix this?

2 answers

0 votes
andertbos March 3, 2022

Hi all,

I am using SourceTree in combination with TwinCAT3. Usually when 2 projects are to be compared and merged without SourceTree, I use the TC compare tool. Doing that, I am in full control what will be merged from the one project into the other. In SourceTree this doesn't seem to be possible? In that sense, the TC compare tool can be used in SourceTree with a

"Diff command argument" = //filel \"$LOCAL\" //filer \"$REMOTE\" //dl \"$LOCAL\" //dr \"$REMOTE\" //sc ,

and a

"Merge command argument" = //filel \"$LOCAL\" //filer \"$REMOTE\" //filem \"$MERGED\" //dl \\\"Head: \"$LOCAL\"\\\" //dm \\\"Result: \"$MERGED\"\\\" //dr \"$REMOTE\" //sc .

But the TC compare tool seem only to be used in SourceTree before, or after the merge. While I want to use the TC compare tool during the merge: I want to compare the 2 projects during the merge. I want to have full control over what will be merged. Right now there are too many negative surprises after the merge in SourceTree.

You have suggestions how to use the TC compare tool by comparing both complete branches during the merge in SourceTree?

Thanks a lot.

0 votes
Daniel Ebers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2020

Hi Mark,

although I cannot say something specific at this point I wanted to express the "guess" that the culprit could be the blank space in "c:/program files/".

This is something that is seen regularly - but in no way limited to Sourcetree, Git or so.

Possible you could rule out this source of trouble by creating a directory without space for this purpose.

Let us hear from you if you got it fixed.

Cheers,
Daniel

Mark van der Lee November 10, 2020

Hi Daniel,

Thanks for the quick reply. Unfortunately the blank space was not the problem.

The good news is I finally got it working yesterday. By using '//' instead of '/' everything works perfectly. This results in the following SourceTree settings for TwinCAT:

External command:
"C:\TwinCAT\3.1\Components\TcProjectCompare\TcProjectCompare.exe"

External diff parameters:
"//filel $LOCAL //filer $REMOTE //dl 'Mine' //dr 'Theirs' //sc"

External merge parameters:
"//filel $LOCAL //filer $REMOTE //filem $MERGED //dl 'Mine' //dr 'Theirs' //sc"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events