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

Re: svn commit: r12329 - in trunk/subversion: clients/cmdline include libsvn_client

From: <kfogel_at_collab.net>
Date: 2004-12-17 20:08:23 CET

jpieper@tigris.org writes:
> Log:
> Clean up some new APIs to be introduced in 1.2 as pointed out by
> Julian Foad in http://svn.haxx.se/dev/archive-2004-11/0649.shtml.
>
> * subversion/include/svn_client.h
> (svn_client_export3, svn_client_ls2): Specify the peg revision and
> revision arguments as const.
>
> * subversion/libsvn_client/externals.c
> (handle_external_item_change): Use the latest version of the
> svn_client_export function. For now, always make the peg revision
> be the same as the specified revision argument.
>
> * subversion/libsvn_client/export.c
> (svn_client_export3): Minor change in order to not violate a const
> revision argument.
>
> * subversion/libsvn_client/ls.c
> (svn_client_ls2): Declare the revision arguments as const.
>
> * subversion/clients/cmdline/propedit-cmd.c
> (svn_cl__propedit): Use the latest version of the svn_client_propget
> command.

Maybe "Use svn_client_propget2." in that last item? Or "Use
svn_client_propget2 instead of svn_client_propget." It's a lot easier
to parse if the new symbol name is actually in there, IMHO.

> Modified: trunk/subversion/clients/cmdline/propedit-cmd.c
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/clients/cmdline/propedit-cmd.c?view=diff&rev=12329&p1=trunk/subversion/clients/cmdline/propedit-cmd.c&r1=12328&p2=trunk/subversion/clients/cmdline/propedit-cmd.c&r2=12329
> ==============================================================================
> --- trunk/subversion/clients/cmdline/propedit-cmd.c (original)
> +++ trunk/subversion/clients/cmdline/propedit-cmd.c Thu Dec 16 05:33:48 2004
> @@ -176,6 +176,7 @@
> const char *target_local;
> svn_wc_adm_access_t *adm_access;
> const svn_wc_entry_t *entry;
> + svn_opt_revision_t peg_revision;
>
> svn_pool_clear (subpool);
> SVN_ERR (svn_cl__check_cancel (ctx->cancel_baton));
> @@ -191,12 +192,17 @@
> "not yet supported"), target);
> }
>
> + /* Propedits can only happen on HEAD or the working copy, so
> + the peg revision can be as unspecified. */
> + peg_revision.kind = svn_opt_revision_unspecified;
> +

s/as//

(Totally minor nit, not worth its own commit of course. I just
happened to be reviewing, and it would be out of character not to say
something :-) ).

> --- trunk/subversion/libsvn_client/export.c (original)
> +++ trunk/subversion/libsvn_client/export.c Thu Dec 16 05:33:48 2004
> @@ -714,8 +714,8 @@
> svn_client_export3 (svn_revnum_t *result_rev,
> const char *from,
> const char *to,
> - svn_opt_revision_t *peg_revision,
> - svn_opt_revision_t *revision,
> + const svn_opt_revision_t *peg_revision,
> + const svn_opt_revision_t *revision,
> svn_boolean_t force,
> const char *native_eol,
> svn_client_ctx_t *ctx,
> @@ -808,16 +808,17 @@
> }
> else
> {
> + svn_opt_revision_t working_revision = *revision;
> /* This is a working copy export. */
> - if (revision->kind == svn_opt_revision_unspecified)
> + if (working_revision.kind == svn_opt_revision_unspecified)
> {
> /* Default to WORKING in the case that we have
> been given a working copy path */
> - revision->kind = svn_opt_revision_working;
> + working_revision.kind = svn_opt_revision_working;
> }
>
> /* just copy the contents of the working copy into the target path. */
> - SVN_ERR (copy_versioned_files (from, to, revision, force, native_eol,
> + SVN_ERR (copy_versioned_files (from, to, &working_revision, force, native_eol,
> ctx, pool));
> }

Probably copy_versioned_files() should mark its 'revision' argument
with 'const' as well. Even though it's an internal API, no reason not
to be as clean as we can be.

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 17 20:10:30 2004

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.