Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,292
Community Members
 
Community Events
165
Community Groups

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

0 votes
Answer accepted

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.

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.

Like Maicon Saraiva likes this

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
Community showcase
Published in Sourcetree

Bug Fix: Sourcetree for Windows authentication error when updating to app password

Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...

61,923 views 127 27
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you