kfogel@tigris.org writes:
> Modified: branches/locking/subversion/clients/cmdline/unlock-cmd.c
> ==============================================================================
> --- branches/locking/subversion/clients/cmdline/unlock-cmd.c (original)
> +++ branches/locking/subversion/clients/cmdline/unlock-cmd.c Sat Mar 12 17:10:38 2005
> @@ -49,9 +49,9 @@
> const char *path,
> svn_boolean_t do_lock,
> const svn_lock_t *lock,
> - svn_error_t *ra_err)
> + svn_error_t *ra_err)
> {
Oops. Funky formatting.
> Modified: branches/locking/subversion/libsvn_client/locking_commands.c
> ==============================================================================
> --- branches/locking/subversion/libsvn_client/locking_commands.c (original)
> +++ branches/locking/subversion/libsvn_client/locking_commands.c Sat Mar 12 17:10:38 2005
[...]
> @@ -286,26 +356,41 @@
> _("Lock comment has illegal characters."));
> }
>
> - SVN_ERR (open_lock_targets (&entry, &adm_access, &path_revs,
> - targets, TRUE, force, ctx, pool));
> + SVN_ERR (organize_lock_targets (&common_parent, &entry, &adm_access,
> + &path_revs, targets, TRUE, force, ctx,
> + pool));
> +
> + is_url = svn_path_is_url (common_parent);
> +
> + if (is_url)
> + url = common_parent;
> + else
> + url = entry->url;
I think entry->url is not guaranteed to exist. If the common parent
happens to be schedule-add or something. Might wanna check that just
in case (similar to the way organize_lock_targets() checks the
individual entries for its target list).
> @@ -324,19 +409,34 @@
> apr_pool_t *pool)
> {
> svn_wc_adm_access_t *adm_access;
> + const char *common_parent;
> const svn_wc_entry_t *entry;
> + const char *url;
> svn_ra_session_t *ra_session;
> apr_hash_t *path_tokens;
> struct lock_baton cb;
>
> - SVN_ERR (open_lock_targets (&entry, &adm_access, &path_tokens,
> - targets, FALSE, force, ctx, pool));
> + SVN_ERR (organize_lock_targets (&common_parent, &entry, &adm_access,
> + &path_tokens, targets, FALSE, force, ctx,
> + pool));
> +
> + if (svn_path_is_url (common_parent))
> + {
> + url = common_parent;
> + /* Unlocking a URL is pointless with the 'force' flag anyway, so
> + just set it if we're operating on URLs. */
> + force = TRUE;
> + }
> + else
> + {
> + url = entry->url;
> + }
Same thing here. In fact, you can have organize_lock_targets() do
this check for you and cover both of these spots. It'll be checking
parent_entry_p->url or whatever.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 14 22:25:03 2005