sussman@tigris.org writes:
> Modified: trunk/subversion/clients/cmdline/proplist-cmd.c
> ==============================================================================
> --- trunk/subversion/clients/cmdline/proplist-cmd.c (original)
> +++ trunk/subversion/clients/cmdline/proplist-cmd.c Tue Oct 1 16:25:26 2002
[snip]
> @@ -53,28 +54,80 @@
> /* Add "." if user passed 0 arguments */
> svn_opt_push_implicit_dot_target (targets, pool);
>
> - for (i = 0; i < targets->nelts; i++)
> +
> + /* Decide if we're listing local, versioned working copy props, or
> + listing unversioned revision props in the repository. 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_array_header_t *props;
> - int j;
> + svn_revnum_t rev;
> + const char *URL, *target;
> + svn_boolean_t is_url;
> + svn_client_auth_baton_t *auth_baton;
> + apr_hash_t *proplist;
> +
> + 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 an unversioned item then 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:23:02 2002