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

Re: diff_peg option -u or -c.

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Mon, 23 Jan 2012 13:36:20 +0100

On Mon, Jan 23, 2012 at 1:07 PM, Marcello Henrique <faraohh_at_gmail.com> wrote:
> Hello,
>
> Is possible send -u or -c options to diff through svn_client_diff4? I
> noted that in docs [0] exists diff_options but does not seems to work.
>
> In brief, I would like display all context in diff operation, not only
> 3 lines as default options.
>
> [0] http://subversion.apache.org/docs/api/latest/group__Diff.html#gab6d98080d85b7240eb5b7a62e54364d9

The "internal diff" of svn does not support changing the number of
context lines. It only supports exactly the diff options that are
listed in the 'svn help diff' output:

[[[
$ svn help diff
...
  --diff-cmd ARG : use ARG as diff command
  -x [--extensions] ARG : Default: '-u'. When Subversion is invoking an
                             external diff program, ARG is simply passed along
                             to the program. But when Subversion is using its
                             default internal diff implementation, or when
                             Subversion is displaying blame annotations, ARG
                             could be any of the following:
                                -u (--unified):
                                   Output 3 lines of unified context.
                                -b (--ignore-space-change):
                                   Ignore changes in the amount of white space.
                                -w (--ignore-all-space):
                                   Ignore all white space.
                                --ignore-eol-style:
                                   Ignore changes in EOL style.
                                -p (--show-c-function):
                                   Show C function name in diff output.
...
]]]

If you want, you can let 'svn diff' invoke an external diff program
(--diff-cmd), and then you can use any options you want (as long as
they're supported by your external diff program of course)

-- 
Johan
Received on 2012-01-23 13:37:16 CET

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.