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

Re: svn commit: r1187160 - /subversion/trunk/subversion/libsvn_delta/compat.c

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Fri, 21 Oct 2011 08:29:28 +0200

hwright_at_apache.org wrote on Fri, Oct 21, 2011 at 01:40:04 -0000:
> Author: hwright
> Date: Fri Oct 21 01:40:03 2011
> New Revision: 1187160
>
> URL: http://svn.apache.org/viewvc?rev=1187160&view=rev
> Log:
> Ev2 shims: Allow callers to pass the kind of a node when building a delta
> editor tree. Most times, this information will be available for free.
>
> * subversion/libsvn_delta/compat.c
> (build): Add a kind argument, and use it.
> (add_directoy_cb, add_file_cb, set_props_cb, set_text_cb): Update callers.
>
> Modified:
> subversion/trunk/subversion/libsvn_delta/compat.c
>
> Modified: subversion/trunk/subversion/libsvn_delta/compat.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1187160&r1=1187159&r2=1187160&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_delta/compat.c (original)
> +++ subversion/trunk/subversion/libsvn_delta/compat.c Fri Oct 21 01:40:03 2011
> @@ -627,6 +627,7 @@ static svn_error_t *
> build(struct editor_baton *eb,
> action_code_t action,
> const char *relpath,
> + svn_kind_t kind,
> const char *url,
> svn_revnum_t rev,
> apr_hash_t *props,
> @@ -683,8 +684,11 @@ build(struct editor_baton *eb,
> operation->operation =
> operation->operation == OP_DELETE ? OP_REPLACE : OP_ADD;
>
> - SVN_ERR(eb->fetch_kind_func(&operation->kind, eb->fetch_kind_baton,
> - relpath, scratch_pool));
> + if (kind == svn_kind_none)
> + SVN_ERR(eb->fetch_kind_func(&operation->kind, eb->fetch_kind_baton,
> + relpath, scratch_pool));
> + else
> + operation->kind = kind;

s/svn_kind_none/svn_kind_unknown/ ?

> operation->copyfrom_url = url;
> operation->copyfrom_revision = rev;
> }
> @@ -704,8 +708,7 @@ build(struct editor_baton *eb,
> }
> else
> {
> - SVN_ERR(eb->fetch_kind_func(&operation->kind, eb->fetch_kind_baton,
> - relpath, scratch_pool));
> + operation->kind = kind;
> if (operation->kind == svn_kind_file)
> operation->operation = OP_OPEN;
> else if (operation->kind == svn_kind_none)
Received on 2011-10-21 08:30:26 CEST

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.