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

Re: Starting a diff program from an email?

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2006-01-21 16:13:38 CET

Renaud Waldura wrote:
> Hello Tortoise Users,
>
> I'm writing a daily report of Subversion activity. Instead of attaching
> textual diffs, I want the report to include links that fire up a diff
> program. The report is sent by email, and the links look like (I made
> this up):
>
> <a
> href="diff:svn://server/repos/myproject/trunk/dir/file.txt?rev1=234&rev2=235">
>
> /myproject/trunk/dir/file.txt
> </a>
>
> How can I start a program from a link inside of an email? I wrote a
> batch (.cmd) script that does what I want next: parse the URL, get the
> file from Subversion at rev1 and rev2 (using "svn cat"), start up the
> diff program to look at both.
>
> But I'm having a hard time bridging the gap between the link and this
> script. It seems to me I should register a protocol handler for the
> "diff" protocol, but I have no idea how to do this.
>
> Any comments/pointers?

Comments:

I like the idea. But I wonder how your diff tool can get the two files
(one for each revision)? Or does your script fetch those files for the
diff tool?

Pointers:

To register a protocol handler, you have to create some entries in the
registry.
[HKEY_CLASSES_ROOT]
   [diff]
     (Default) = "URL:My Diff Handler"
     URL Protocol = ""
     [DefaultIcon]
       (Default) = "Icon_for_diff_handler.ico"
     [shell]
       [open]
         [command]
           (Default) = "c:\whatever\difftool.exe "%1""

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Sat Jan 21 16:13:46 2006

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

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