On Mon, Feb 19, 2007 at 12:23:02AM -0500, William Nagel wrote:
> I'm attaching a patch to fix issue #2531. It adds a warning message
> to 'svn switch --relocate' to let users know when a relocate doesn't
> result in any actual rewriting of the working copy URLs.
>
> This is only my second patch submission for Subversion, so I'm very
> open to any commentary.
>
> -Bill
>
It's slightly more difficult to review attached patches, which is
why we prefer them in-line.
I think this patch would cause svn to warn on valid multi-target operations
(if any of the targets aren't relocated).
Otherwise, a few nits:
> @@ -35,13 +35,16 @@
> * TO. ADM_ACCESS is the access baton for ENTRY. If DO_SYNC is set then
> * the new entry will be written to disk immediately, otherwise only the
> * entries cache will be affected. Calls VALIDATOR passing VALIDATOR_BATON
> - * to validate new URLs.
> + * to validate new URLs. Takes a pointer COUNT that references the number
> + * of modifications made. If the entry is actually modified, TOUCHED will
> + * be set to true.
> */
Stray sentence about "pointer COUNT".
> svn_error_t *
> -svn_wc_relocate2(const char *path,
> +perform_relocate(const char * path,
svn_wc_adm_access_t *adm_access,
const char *from,
This function should be declared static.
> +svn_error_t *
> +svn_wc_relocate2(const char *path,
> + svn_wc_adm_access_t *adm_access,
> + const char *from,
> + const char *to,
> + svn_boolean_t recurse,
> + svn_wc_relocation_validator2_t validator,
> + void *validator_baton,
> + apr_pool_t *pool)
> +{
> + svn_boolean_t *touched = apr_pcalloc(pool, sizeof(svn_boolean_t));
> + SVN_ERR(perform_relocate(path, adm_access, from, to, recurse, touched,
> + validator, validator_baton, pool));
> + if (!(*touched))
There's no need to allocate touched in a pool.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 27 19:42:54 2007