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

Re: automation question: is it possible to override the diff tool?

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 31 Aug 2009 07:09:03 +0200

On 29.08.2009 02:29, Hari Krishna Dara wrote:
> I have been working on a plugin for vim to invoke tortoisesvn commands
> from with in vim. It works very nicely and I hardly ever go to the
> windows explorer. Thanks a lot for supporting command-line options,
> though it is meant as a GUI tool.
>
> Now about the issue that I need help with, I am content with most of
> the external dialogs that naturally result by executing tortoisesvn
> commands (compared to executing the command-line client), but one
> particular option that I would like to change is the diff command. I
> would like to optionally be able to use vimdiff for 2-way and 3-way
> diffs and so wondering if it is possible to specify the diff-cmd that
> should be used for that invocation. I know that I can specify gvim as
> the diff-cmd in the global settings, but that would result in starting
> up a new gvim instance, but what I want is to be able to use the
> original vim window from which the tortoisesvn command was issued
> (which means, I need to embed the vim servername/windowname in the
> diff command line). Is this possible using the "configdir" option ?
> Starting from %APPDIR%\Subversion\config, I created a config under
> c:\tmp that has only the below two lines:
>
> [helpers]
> diff-cmd = gvim --servername gvimtest --remote-tab-silent +"set
> bufhidden=wipe | vert diffsplit %mine | wincmd x" "%base"

The diff-cmd param in the config file is used only by the svn library
when doing diffs that happen for updates/merges (*during* that
operation). It's meant to be used if someone doesn't want to use the
internal diff algorithm of svn but e.g. GNU diff or something like that.

Since the diff-cmd option is for non-UI diff tools, TSVN disabled that
option before doing an UI diff.

>
> and used the /configdir:c:\tmp option to the "repostatus" command, but
> when I tried to compare against base, it started my default diff
> command, not gvim. I know it is reading the c:\tmp\config file because
> when I the [helpers] header missing, it complained about it. What am I
> missing here? The command-line that I use is:
>
> "C:\apps\TortoiseSVN\bin\TortoiseProc.exe" /closeonend:2
> /configdir:"c:\tmp" /command:"repostatus" /path:"."

It's not possible to specify the diff tool to use for TSVN on the
command line. Sorry.

> On the same note, I would like to override editor-cmd also in this
> config file, but don't understand in what context it is used. I see
> "Open file" which I believe opens them with windows explorer (this
> e.g., causes python files to get executed with python.exe), so
> wondering which menu options actually use this config setting. I would
> appreciate any help.

editor-cmd is used only by the command line client for entering e.g.
commit messages. It's not used at all by UI clients.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2388740
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-08-31 07:09:22 CEST

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.