1

[enter image description here][1]I am stuck in setting up merge tool based on mime-types in TortoiseSVN.

It works fine when setting up the merge tool (KDiff3) based on file extensions, like .xml. However, it doesn't work when trying to assotiate with mime-types, referring to TortoiseSVN's help document:

To associate using a file extension, you need to specify the extension. Use .bmp to describe Windows bitmap files. To associate using the svn:mime-type property, specify the mime type, including a slash, for example text/xml.

I'm not sure if this is a bug of TortoiseSVN, or I misunderstood the help document. Can anybody shed me some light? Thanks.

I'm using Windows 7, 64bit, TortoiseSVN 1.9.4.

(I'm new enough in StackOverflow that I am not able to post picture yet. Orz) TSN Settings

L Mark
  • 11
  • 3
  • Path with spaces (to Kdiff3) must be wrapped to "" around string AFAIK. See parameters part for extension-specific mergers – Lazy Badger Nov 17 '17 at 07:53
  • Thank you @LazyBadger for pointing out that. I had actually tried with or without double quotes, however, neither of them worked. When clicking "Edit conflict" during merging, it still called TortoiseSVN's builtin merge tool. (BTW, I have updated the screenshot now.) – L Mark Nov 19 '17 at 16:07
  • For testing purpose, I had tried setting up mime-type merge tool to a custom tool, which would simply write a log file when being called. However, no log file was created. So it looks like the mime-type merge tool was not called at all. Not sure if this is a bug, or I have miss-used this feature. @_@ – L Mark Nov 19 '17 at 16:13
  • Or your file have NOT text/xml mime-type. Check it - https://stackoverflow.com/questions/1029740/get-mime-type-from-filename-extension or better https://stackoverflow.com/questions/32460177/how-can-i-find-out-a-files-mime-typecontent-type-on-windows with simplest handler like `echo "This is XXX|YYY|ZZZ type"` – Lazy Badger Nov 19 '17 at 18:26
  • Hello Badger, Thank you for your advice. I have tested it with a true XML file --- the result of `file --mime-type Rules.xml` is `Rules.xml: text/xml`, so we can be sure it is an xml file. I edited some contents of this file in both trunk and development branch, and then tried to merge one to the other. When editing conflicts, the program being called is still TortoiseMerge, not Kdiff3. Looks weird. It seems TorgoiseSVN only supports specifying merge tool by file extensions, but not mime-types although it declares to support that. – L Mark Nov 20 '17 at 05:18
  • Just one note (I forgot it, sorry) - [check mime-type in Subversion](https://cwiki.apache.org/confluence/display/MINA/Setting+SVN+Properties+in+TortoiseSVN+Client) also - for some reason `*.xml` *can be* redefined in configuration file. If all still OK - you can|have to [fill bugreport](https://sourceforge.net/p/tortoisesvn/tickets/) for @stefan – Lazy Badger Nov 20 '17 at 07:45

0 Answers0