[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 1514 - trunk trunk/subversion/include trunk/subversion/libsvn_wc trunk/subversion/libsvn_client trunk/subversion/clients/cmdline trunk/subversion/tests/clients/cmdline

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-03-14 21:49:53 CET

Oof... stringbuf propagation...

On Thu, Mar 14, 2002 at 02:25:12PM -0600, sussman@tigris.org wrote:
>...
> +++ trunk/subversion/include/svn_wc.h Thu Mar 14 14:25:09 2002
>...
> +svn_error_t *svn_wc_resolve_conflict (svn_stringbuf_t *path,
> + svn_wc_notify_func_t notify_func,
> + void *notify_baton,
> + apr_pool_t *pool);

'const char *' would have been nice, but I can see continuing to use a
stringbuf for similarity with other WC functions until we can revamp all of
them. But still...

>...
> +++ trunk/subversion/include/svn_client.h Thu Mar 14 14:25:09 2002
>...
> +svn_error_t *
> +svn_client_resolve (svn_stringbuf_t *path,
> + svn_wc_notify_func_t notify_func,
> + void *notify_baton,
> + apr_pool_t *pool);

Same comment as above.

>...
> +++ trunk/subversion/libsvn_wc/adm_ops.c Thu Mar 14 14:25:09 2002
> @@ -1431,6 +1431,82 @@
>
>
>
> +/* Helper for svn_wc_resolve_conflict; deliberately ignores errors
> + from apr_file_remove(). */
> +static void
> +attempt_deletion (svn_stringbuf_t *parent_dir,
> + svn_stringbuf_t *basename,
> + apr_pool_t *pool)
> +{
> + svn_stringbuf_t *full_path = svn_stringbuf_dup (parent_dir, pool);
> + svn_path_add_component (full_path, basename);
> +
> + apr_file_remove (full_path->data, pool);
> +}

Being a private function, this could definitely have been simplified to use
'const char *' for the two params, and then the function becomes awfully
simple:

  apr_file_remove (svn_path_join (parent_dir, basename, pool));

>...
> +++ trunk/subversion/clients/cmdline/main.c Thu Mar 14 14:25:10 2002
>...
> + { "resolve", svn_cl__resolve, {0},
> + "Remove 'conflicted' state on working copy files or directories.\n"
> + "usage: resolve TARGET1 [TARGET2 [TARGET3 ... ]]\n\n"
> + " Note: this routine does not semantically resolve conflict markers;\n"
> + " it merely removes conflict-related artifact files and allows TARGET\n"
> + " to be committed again.\n",
> + {svn_cl__targets_opt} },

This command can probably take a "recursive" option. I can easily see
somebody resolving a bunch of conflicts and then doing:

$ svn resolve --recursive

[ assuming "." is the default ]

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 14 21:47:16 2002

This is an archived mail posted to the Subversion Dev mailing list.