Jump to content
andreas@initialforce.com

External text diff/merge tool

Recommended Posts

I am following this article: http://www.semanticmerge.com/sm-guides/main.shtml#Launchoptionsconfigurationfile

 

I want to be able to launch an external text diff/merge tool for certain cases that Semantic Merge can't handle smart. I think I saw in one of the change logs that an external text tool can be launched by holding the shift key? When pressing the text diff button? It didn't seem to work. I don't want to override the text diff tool in general, just for particular cases where I know other tools work better.

 

Example:

Whenever I edit a merge for an XML file, it tells me it can't parse the file and offers the option to use "Text Diff", but this button still launches the internal diff (Xmerge?). 

In this case, I would like to use TortoiseMerge.exe.

 

My setup is:

 

C:\Users\Andreas\AppData\Local\semanticmerge\semanticmergetool.conf

 

# external diff tool -> tortoisemerge
-edt="C:/Program Files/TortoiseSVN/bin/TortoiseMerge.exe" "#sourcefile" "#destinationfile"
# external mergetool -> kdiff3 with symbolic info
-emt="C:/Program Files/TortoiseSVN/bin/TortoiseMerge.exe" "#basefile" "#sourcefile" "#destinationfile"

 

 

However, it still launches the internal diff/merge tool when clicking the Text Diff button in the "can't parse" dialog.

Share this post


Link to post
Share on other sites

Hi Andreas!

 

I want to be able to launch an external text diff/merge tool for certain cases that Semantic Merge can't handle smart. I think I saw in one of the change logs that an external text tool can be launched by holding the shift key? When pressing the text diff button? It didn't seem to work. I don't want to override the text diff tool in general, just for particular cases where I know other tools work better.

 

I have two questions here:

1) You say that certain cases SM can't handle them smart, it's due to they are XML or are any supported language but the result is not what you expect? If it's the second one can you please send us the merge case to support at codicesoftware dot com?

2) I have just tested the shift key + click and I get the diff window behind SemanticMerge.... Check if it's your problem... first time I thought it was failing too but it was actually hidden....

 

Example:

Whenever I edit a merge for an XML file, it tells me it can't parse the file and offers the option to use "Text Diff", but this button still launches the internal diff (Xmerge?). 

In this case, I would like to use TortoiseMerge.exe.

 

Do you know about the "--nolangwarn" argument? It allows you to save that message and skip the dialog, it should open the secondary merge tool.

 

 

# external diff tool -> tortoisemerge

-edt="C:/Program Files/TortoiseSVN/bin/TortoiseMerge.exe" "#sourcefile" "#destinationfile"
# external mergetool -> kdiff3 with symbolic info
-emt="C:/Program Files/TortoiseSVN/bin/TortoiseMerge.exe" "#basefile" "#sourcefile" "#destinationfile"

 

1) Try replacing the "/" path separators with the windows path separators "\" and also soround 

2) Add extra quotes to the external tool:

-edt=""C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe" "#sourcefile" "#destinationfile""
# external mergetool -> kdiff3 with symbolic info
-emt=""C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe" "#basefile" "#sourcefile" "#destinationfile""

The SemanticMerge log will also tell us more info about any problem so please take a look into it and post it to us (semantic.log.txt).

Share this post


Link to post
Share on other sites

Thank you for the feedback, somehow I never got a notification on this, had to enable that manually in my profile.

 

The typical file in question is .csproj XML files. It's fine that it falls back to text merge, I'm just still not able to use an external diff/merge tool for the job.

I removed -lang=csharp option and that shows a different dialog when editing conflicts on .csproj files. If I shift+click text tool button, it still opens xmerge, but after closing xmerge I now get a new dialog saying an external merge tool was not configured. That's new and at least it tells me my configuration has not been recognized.

 

I tried your suggestions of using \ separator and adding extra quotes at start/end, but that did not seem to have any effect. I also re-read the articles in the hope they had been updated, but they do not seem to.

 

I just figured it out though, while writing this. I checked my tortoisegit settings and I had specified -edt=default and -emt=default. Obviously this took precedence over what I configured in the semanticmerge.conf file. I removed those and now the external tool is working again.

 

TLDR;

Check the arguments you invoke semanticmerge.exe with and remove any -edt or -emt parameters, because they will have higher priority than semanticmerge.conf file.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...