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

Re: Diff Project --invoke-diff-cmd part

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Fri, 12 Apr 2013 08:54:17 -0400

On 04/11/2013 05:39 PM, Gabriela Gibson wrote:
> This patch plugs in a new option --invoke-diff-cmd into the existing
> diff command structure, but does leave the existing "diff-cmd" option
> untouched.
>
> This addition allows the user to define a complex diff command, to be
> applied in place of the internal diff, for example:
>
> svn diff --invoke-diff-cmd="kdiff3 -auto -o /home/g/log ---f1 ---f2 --L1
> ---l1 --L2 "MyLabel""
>
> either on the command line(for example):
>
> svn diff --invoke-diff-cmd="diff -y ---f1 ---f2"
>
> which expands to "diff -y *from *to",
>
> or, in the config file by adding
>
> invoke-diff-cmd= diff -y ---f1 ---f2
>
> where ---f1 ---f2 are file 1 and 2. and ---l1 ---l2 are labels.

I like the idea! I note that you don't draw attention to any existing
issues, but you might want to review issue #2044 and see if your work
resolves the request there:

   http://subversion.tigris.org/issues/show_bug.cgi?id=2044

Also, a minor design nit (sorry, no code review): The "---f1" construct is
something I've never seen before. I would suggest that we use the more
common percent-based format specifier construct:

   svn diff --invoke-diff-cmd="kdiff3 -auto -o /home/g/log %f1 %f2 \
                               --L1 %l1 --L2 'MyLabel'"

(ala 'date +FORMAT', 'time -f FORMAT', 'ps -o FORMAT', ...)

Hrm... though, I wonder if percent-based formats cause complications for
Windows users...

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

Received on 2013-04-12 14:54:50 CEST

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

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