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

Re: svn commit: rev 3265 - trunk/subversion/include trunk/subversion/libsvn_ra_local trunk/subversion/libsvn_client trunk/subversion/clients/cmdline trunk/subversion/libsvn_ra_dav

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-10-03 19:11:21 CEST

sussman@tigris.org writes:

> Modified: trunk/subversion/clients/cmdline/propget-cmd.c
> ==============================================================================
> --- trunk/subversion/clients/cmdline/propget-cmd.c (original)
> +++ trunk/subversion/clients/cmdline/propget-cmd.c Wed Oct 2 12:32:25 2002
> @@ -63,45 +63,101 @@
> /* Add "." if user passed 0 file arguments */
> svn_opt_push_implicit_dot_target (targets, pool);
>
> - for (i = 0; i < targets->nelts; i++)
> + /* Decide if we're querying a working copy prop or a repository
> + revision prop. The existence of the '-r' flag is the key. */
> + if (opt_state->start_revision.kind != svn_opt_revision_unspecified)
> {
> - const char *target = ((const char **) (targets->elts))[i];
> - apr_hash_t *props;
> - apr_hash_index_t *hi;
> - svn_boolean_t print_filenames = FALSE;
> -
> - SVN_ERR (svn_client_propget (&props, pname_utf8, target,
> - opt_state->recursive, pool));
> -
> - print_filenames = (targets->nelts > 1 || apr_hash_count (props) > 1);
> + svn_revnum_t rev;
> + const char *URL, *target;
> + svn_boolean_t is_url;
> + svn_client_auth_baton_t *auth_baton;
> + svn_string_t *propval;
> +
> + auth_baton = svn_cl__make_auth_baton (opt_state, pool);
> +
> + /* Either we have a URL target, or an implicit wc-path ('.')
> + which needs to be converted to a URL. */
> + if (targets->nelts <= 0)
> + return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL, pool,
> + "No URL target available.");
> + target = ((const char **) (targets->elts))[0];
> + is_url = svn_path_is_url (target);
> + if (is_url)
> + {
> + URL = target;
> + }
> + else
> + {
> + svn_wc_adm_access_t *adm_access;
> + const svn_wc_entry_t *entry;
> + SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, target,
> + FALSE, FALSE, pool));
> + SVN_ERR (svn_wc_entry (&entry, target, adm_access, FALSE, pool));
> + SVN_ERR (svn_wc_adm_close (adm_access));
> + URL = entry->url;

If target is unversioned entry will be NULL.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 3 19:22:17 2002

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.