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

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

This widget could not be displayed.

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

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

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

This widget could not be displayed.

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.  :)

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

870 views 2 3
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