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

[TSVN] RE: external diff and changing file extensions

From: Duncan Booth <duncan.booth_at_suttoncourtenay.org.uk>
Date: 2005-02-11 17:10:15 CET

Lübbe Onken wrote:

> As Erv said, setup word as your external diff tool in TSVN based on
> file type. If you find out how to pass two filenames to word on the
> commandline and switch word into side-by-side compare mode
> automatically, please let us know :-)

winword.exe /n /mCompareDocuments <file1> <file2>

The /n will start a new instance of word so it doesn't interfere with
anything you are already doing, /m runs a macro which you would have to
have previously defined in Normal.dot.

The macro might be something like the following:

Sub CompareDocuments()
    Dim OtherDoc As String
    For Each doc In Application.Documents
        If doc.Name <> ActiveDocument.Name Then
            OtherDoc = doc.Name
            doc.Close
        End If
    Next doc
    ActiveDocument.Compare Name:=OtherDoc
End Sub

Error checking, marking the activedocument as readonly and not modified and
so on are left as an exercise for the reader.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Feb 11 21:55:01 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

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