TortoiseSVN/TortoiseMerge - Diff XML files ignoring irrelevant differences

432 views
Skip to first unread message

Kerry, Richard

unread,
Nov 26, 2014, 9:24:58 AM11/26/14
to us...@tortoisesvn.tigris.org

 

When differencing some file-types, eg XML, whitespace and some details of the syntax don’t actually mean a significant difference.  Two XML files might appear from a straightforward text diff to be quite different, but to an XML-aware differencer they could be the same.

 

On looking at XML files in TortoiseMerge I am seeing these irrelevant differences and it is making it very difficult to spot real changes, either to plan my commit, or to do a merge.

 

I have come fairly recently to Subversion and TortoiseSvn and TortoieMerge, having used CVSNT/CVS Suite for many years.  With CVSNT I’ve used WinMerge for showing differences.  WinMerge comes with some filters to normalize irrelevant differences between files so this issue can be worked around (though the filters do prevent these file-types being merged).

 

Is there a feature for doing this within TortoiseSvn/TortoiseMerge ?

I notice that there is some filetype specific selection of differencing that is used for MS Word files, for example.  I’ve found the “Advanced diff settings” page where plugins are configured for Word/Excel etc but there is no sign of anything provided for XML.

 

Is there anything built-in to ToitoiseSvn or TortoiseMerge that I’m missing ?  Or any existing plug-in that I might consider using ?

 

 

Regards,

Richard.

 

Richard Kerry

BNCS Engineer, SI SOL Telco & Media Vertical Practice

 

T: +44 (0)20 3618 2669

M: +44 (0)7812 325518

Lync: +44 (0) 20 3618 0778

Room G300, Stadium House, Wood Lane, London, W12 7TA

richar...@atos.net

 

 

 

Atos, Atos Consulting, Worldline and Canopy The Open Cloud Company are trading names used by the Atos group. The following trading entities are registered in England and Wales: Atos IT Services UK Limited (registered number 01245534), Atos Consulting Limited (registered number 04312380), Atos Worldline UK Limited (registered number 08514184) and Canopy The Open Cloud Company Limited (registration number 08011902). The registered office for each is at 4 Triton Square, Regent’s Place, London, NW1 3HG.The VAT No. for each is: GB232327983.

This e-mail and the documents attached are confidential and intended solely for the addressee, and may contain confidential or privileged information. If you receive this e-mail in error, you are not authorised to copy, disclose, use or retain it. Please notify the sender immediately and delete this email from your systems. As emails may be intercepted, amended or lost, they are not secure. Atos therefore can accept no liability for any errors or their content. Although Atos endeavours to maintain a virus-free network, we do not warrant that this transmission is virus-free and can accept no liability for any damages resulting from any virus transmitted. The risks are deemed to be accepted by everyone who communicates with Atos by email.

Simon Large

unread,
Nov 26, 2014, 9:32:46 AM11/26/14
to us...@tortoisesvn.tigris.org
On 26 November 2014 at 14:24, Kerry, Richard <richar...@atos.net> wrote:

 

When differencing some file-types, eg XML, whitespace and some details of the syntax don’t actually mean a significant difference.  Two XML files might appear from a straightforward text diff to be quite different, but to an XML-aware differencer they could be the same.

 

On looking at XML files in TortoiseMerge I am seeing these irrelevant differences and it is making it very difficult to spot real changes, either to plan my commit, or to do a merge.

 

I have come fairly recently to Subversion and TortoiseSvn and TortoieMerge, having used CVSNT/CVS Suite for many years.  With CVSNT I’ve used WinMerge for showing differences.  WinMerge comes with some filters to normalize irrelevant differences between files so this issue can be worked around (though the filters do prevent these file-types being merged).

 

Is there a feature for doing this within TortoiseSvn/TortoiseMerge ?

I notice that there is some filetype specific selection of differencing that is used for MS Word files, for example.  I’ve found the “Advanced diff settings” page where plugins are configured for Word/Excel etc but there is no sign of anything provided for XML.


Is there anything built-in to ToitoiseSvn or TortoiseMerge that I’m missing ?  Or any existing plug-in that I might consider using ?




Subversion/TortoiseSVN/TortoiseMerge only has native support for plain text. Differencing Word files is done by Word itself with those scripts telling it how to invoke Word. However if you have found WinMerge to be a good tool then you can configure that to be your diff and/or merge tool of choice for particular file types.

You can find how to do that here:
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-progs

and there is even an example for how to do it for WinMerge :-)

Simon

Florin Viorel Petrov

unread,
Nov 26, 2014, 9:34:33 AM11/26/14
to us...@tortoisesvn.tigris.org
On 26.11.2014 15:24, Kerry, Richard wrote:
> I’ve found the “Advanced
> diff settings” page where plugins are configured for Word/Excel etc but
> there is no sign of anything provided for XML.


Use any 3rd party Diff program which satisfies your XML-diff
requirements as external diff tool in "Advanced diff settings" - just
create a new entry for ".xml" .

Florin Petrov

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3091885

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Ryan Hathaway

unread,
Nov 26, 2014, 10:36:42 AM11/26/14
to richar...@atos.net, us...@tortoisesvn.tigris.org
We integrate Beyond Compare 3 with TortoiseSVN for file comparison purposes here.  Here is an outdated document which shows how to configure Tortoise with our internal recommended settings from a few years ago if you are interested.  Obviously, decide for yourself whether changing each setting from its default makes sense for your current environment.






Thank you,

-Ryan


Ryan Hathaway
Programmer Analyst

Office of Alan Harold, Auditor
Stark County Ohio
110 Central Plaza S
Canton, OH  44702



***Please note:  My email address has changed to rghat...@starkcountyohio.gov ***

>>> "Kerry, Richard" <richar...@atos.net> 11/26/14 9:25 AM >>>
IMAGE2.img
IMAGE1.img
TortoiseSVN Recommended Settings.pdf

Kerry, Richard

unread,
Nov 26, 2014, 12:20:17 PM11/26/14
to us...@tortoisesvn.tigris.org
Thank you all for your suggestions.
I'll have a look at the details you've all provided, but it looks like the best option will be to configure an external tool, either WinMerge or something else. Since it will be specific to XML I think the limitations (*) of WinMerge's plug-in filters may lead me to looking for another tool.


Also, according to TortoiseMerge's help-file there is a Settings page, but I can't actually see how to activate it ?

Regards,
Richard.

(*) Chiefly that it can't write anything back as it just reads and normalizes everything before displaying the result.


Richard Kerry
BNCS Engineer, SI SOL Telco & Media Vertical Practice

Atos, Atos Consulting, Worldline and Canopy The Open Cloud Company are trading names used by the Atos group. The following trading entities are registered in England and Wales: Atos IT Services UK Limited (registered number 01245534), Atos Consulting Limited (registered number 04312380), Atos Worldline UK Limited (registered number 08514184) and Canopy The Open Cloud Company Limited (registration number 08011902). The registered office for each is at 4 Triton Square, Regent’s Place, London, NW1 3HG.The VAT No. for each is: GB232327983.

This e-mail and the documents attached are confidential and intended solely for the addressee, and may contain confidential or privileged information. If you receive this e-mail in error, you are not authorised to copy, disclose, use or retain it. Please notify the sender immediately and delete this email from your systems. As emails may be intercepted, amended or lost, they are not secure. Atos therefore can accept no liability for any errors or their content. Although Atos endeavours to maintain a virus-free network, we do not warrant that this transmission is virus-free and can accept no liability for any damages resulting from any virus transmitted. The risks are deemed to be accepted by everyone who communicates with Atos by email.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3091890

Simon Large

unread,
Nov 26, 2014, 12:39:04 PM11/26/14
to us...@tortoisesvn.tigris.org
On 26 November 2014 at 17:20, Kerry, Richard <richar...@atos.net> wrote:
Thank you all for your suggestions.
I'll have a look at the details you've all provided, but it looks like the best option will be to configure an external tool, either WinMerge or something else.  Since it will be specific to XML I think the limitations (*) of WinMerge's plug-in filters may lead me to looking for another tool.


Also, according to TortoiseMerge's help-file there is a Settings page, but I can't actually see how to activate it ?
 



To get to TMerge settings:
Open TMerge. Click on the band-aid icon in the top left corner.

Simon

Reply all
Reply to author
Forward
0 new messages