[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: <oXygen/> as diff tool for TortoiseSVN

From: Kevin Grover <kevin_at_kevingrover.net>
Date: Mon, 2 Jun 2008 21:40:12 -0700

On Mon, Jun 2, 2008 at 8:01 PM, Hedley Finger <hfinger_at_handholding.com.au>
wrote:

>
> I want to use TortoiseSVN as the poor man's CMS for my XML project (based
> on DITA DTDs). The built-in diff-merge is line oriented, as are many other
> diff tools intended for programmers. This can lead to excessive flagging of
> differences in XML files which, by XML conventions for white space,
> linebreaks, attribute order, etc. are perfectly identical.
>
> Has anybody successfully used <oXygen/> as an XML diff-merge tool with
> TortoiseSVN or any other programming version management programme? How do
> you set TortoiseSVN up to invoke <oXygen/> and pass filename parameters,
> etc.?
>
> Any help received will earn my undying and pathetic gratitude!
>

You just need a diff wrapper. I have one I use for meld, that I just
modified and it almost works for oXygen diff. The command 'diffFiles' is
linked at /usr/bin for me. My script assumes that it's in the path. If
not, just modify the command to point to where ever it is. It should be in
the same directory as the oxygen binary.

This script is for Unix, it should be simple to convert it to a batch script
for windows.

------- svn-diff-oxygen
#!/bin/sh
# $Id$
# $URL$
#
# SVN Diff Wrapper for oXygen diff
#
# KOG 2008-06
#
# alias sd='svn diff --diff-cmd ~/bin/svn-diff-oxygen'

left="$6"
right="$7"

diffFiles "$left" "$right"
------- end: svn-diff-oxygen

for a windows batch file, just change the left= and right= lines to:

set left=%6
set right=%7

When I tried this, it seemed to work, but kept asking my to choose a file
type: I stopped playing with it then. I use a similar script
(svn-diff-meld) to invoke meld all the time.

Notice: I set an alias called 'sd' (the command used is a comment in the
script) to invoke svn diff with the gui wrapper. You can also edit the svn
configuration (~/.subversion/config, or %APPDATA%\Subversion\config in
windows) to have this happen all the time, but then patching (and any
scripts that depend on generating a text svn diff) will stop working. For
windows, I would just create an sb.bat script.

Note: the above is for SVN (cli only). Since this is the SVN group.

If you just want TSVN to use it, you should really post to the TSVN group.
TSVN has options to set a diff command based on extensions. Look at the
options pages. Just add one for XML files that uses the diffFiles command
life above.

- Kevin
Received on 2008-06-03 06:41:16 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.