External merge tool can't open files with spaces in names

Teemu Mehtiö May 8, 2014

Hello,

I'm having problems using external merge tool (TortoiseMerge) with files with spaces in the file names.

If there is a conflict in a file and I choose Resolve Conflicts -> Launch External Merge Tool, the TortoiseMerge opens up but an error message comes up saying it can't find the file.

I have tried different options in Options -> Diff:

  • Using system default merge tool
  • Selecting TortoiseMerge from the merge tool drop down
  • Using custom with TortoiseMerge.exe in the command field and the file names in the arguments field with different quoting options, for example
    • -base:$BASE -mine:$LOCAL -theirs:$REMOTE -merged:$MERGED
    • -base:\"$BASE\" -mine:\"$LOCAL\" -theirs:\"$REMOTE\" -merged:\"$MERGED\"
    • -base:"$BASE" -mine:"$LOCAL" -theirs:"$REMOTE" -merged:"$MERGED"

All have resulted in the same end result: TortoiseMerge can't open the files.

Files without spaces in names open up correctly.

I'm using SourceTree 1.5.2 on Windows 7.

I use TortoiseMerge 1.8.3 as my external merge tool (system default).

Hope someone can help me with this.

Best regards,Teemu

2 answers

1 accepted

0 votes
Answer accepted
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 8, 2014

Hi Teemu,

maybe this can help :

https://github.com/msysgit/msysgit/issues/57

https://www.mail-archive.com/git@vger.kernel.org/msg17298.html

This is not really an Atlassian related problem so you might find more help on stackoverflow or so.

Best regards,

Peter

Teemu Mehtiö May 14, 2014

Thanks Peter,

Thanks for pointing me to the right direction.

Couldn't quite find the correct place to fix this with some quick searching the net. Easiest solution was to change the merge tool from TortoiseMerge to another tool.

Thanks for the help!

Teemu

Anton Zimin March 2, 2016

The bug in mergetools is fixed already, but SourceTree 1.8.2.2 still does not work with TortoiseGitMerge correctly.

2 votes
Maicon Saraiva May 27, 2018

Hi, it's no necesary change another tool.

After tests, i found the problem.

The ":" used in params for open files in TortoiseGitMerge had a stranged bug.

To solve, i set "Custom" in "Diff Toll" option at SourceTree, set the dir for TortoiseGitMerge and put this custom commands:

-base \"$BASE\" -mine \"$LOCAL\" -theirs \"$REMOTE\" -merged \"$MERGED\"

TortoiseGitMerge run normally without ":"

The problem has solved.  :)

Owen Symes August 7, 2018

Yes! This is exactly the answer I was looking for. Thanks @Maicon Saraiva.

Like Maicon Saraiva likes this
evankawa January 7, 2019

Big thanks for this! Been fighting with this problem for months now and after trying different merge tools was still not satisfied. Stumbled across this thread and fixed in seconds. :)

Like Maicon Saraiva likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events