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

Re: [RFC] Introducing svn_client_make_diff_args? (Was: RE: svn commit: r33116 - in branches/ignore-mergeinfo/subversion: include libsvn_client svn)

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 17 Sep 2008 12:03:16 +0100

Bert Huijben wrote:
> > +svn_error_t *
> > +svn_client_diff5(const apr_array_header_t *diff_options,
> > + const char *path1,
> > + const svn_opt_revision_t *revision1,
> > + const char *path2,
> > + const svn_opt_revision_t *revision2,
> > + const char *relative_to_dir,
> > + svn_depth_t depth,
> > + svn_boolean_t ignore_ancestry,
> > + svn_boolean_t no_diff_deleted,
> > + svn_boolean_t ignore_content_type,
> > + svn_boolean_t ignore_mergeinfo,
> > + const char *header_encoding,
> > + apr_file_t *outfile,
> > + apr_file_t *errfile,
> > + const apr_array_header_t *changelists,
> > + svn_client_ctx_t *ctx,
> > + apr_pool_t *pool);
>
> This method has 5 different versions over 7 subversion point releases,
> each adding just on or a few 'optional' parameters.
>
> Shouldn't we create some kind of context/args object that we can
> extend in future versions for methods that probably have yet another
> version in the next release?

Yes, please!

> [[
> Client.Diff("a", "b", diffStream, true, true, false, false, true);
> ]]
> Completely unreadable without intellisense or documentation open.
>
> [[
> SvnDiffArgs args = new SvnDiffArgs();
> args.IgnoreContentType = true;
> args.IgnoreMergeInfo = true;
>
> Client.Diff("a", "b", diffStream, args);
> ]]

> Adding a new property to the args object does not break the ABI and
> does not require a new compatibility wrapper to maintain forever.

+1.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-17 13:03:34 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.