You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/11/30 23:12:43 UTC
svn commit: r1208833 - in /subversion/trunk/subversion/libsvn_wc: status.c
update_editor.c util.c wc.h
Author: hwright
Date: Wed Nov 30 22:12:42 2011
New Revision: 1208833
URL: http://svn.apache.org/viewvc?rev=1208833&view=rev
Log:
In libsvn_wc, when fetching props for the Ev2 shims, add a flag to the baton
so we can fetch the proper kind of props, either actual or base, depending on
the application.
Suggested by: rhuijben
* subversion/libsvn_wc/util.c
(svn_wc__fetch_props_func): Fetch the appropriate kind of props.
* subversion/libsvn_wc/wc.h
(svn_wc__shim_fetch_baton_t): Add flag.
* subversion/libsvn_wc/update_editor.c
(make_editor): Fetch the base props.
* subversion/libsvn_wc/status.c
(svn_wc_get_status_editor5): Fetch the actual props.
Modified:
subversion/trunk/subversion/libsvn_wc/status.c
subversion/trunk/subversion/libsvn_wc/update_editor.c
subversion/trunk/subversion/libsvn_wc/util.c
subversion/trunk/subversion/libsvn_wc/wc.h
Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=1208833&r1=1208832&r2=1208833&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Wed Nov 30 22:12:42 2011
@@ -2549,6 +2549,7 @@ svn_wc_get_status_editor5(const svn_delt
sfb = apr_palloc(result_pool, sizeof(*sfb));
sfb->db = wc_ctx->db;
sfb->base_abspath = eb->target_abspath;
+ sfb->fetch_base = FALSE;
shim_callbacks->fetch_kind_func = svn_wc__fetch_kind_func;
shim_callbacks->fetch_kind_baton = sfb;
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1208833&r1=1208832&r2=1208833&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Wed Nov 30 22:12:42 2011
@@ -4989,6 +4989,7 @@ make_editor(svn_revnum_t *target_revisio
sfb = apr_palloc(result_pool, sizeof(*sfb));
sfb->db = db;
sfb->base_abspath = eb->target_abspath;
+ sfb->fetch_base = TRUE;
shim_callbacks->fetch_kind_func = svn_wc__fetch_kind_func;
shim_callbacks->fetch_kind_baton = sfb;
Modified: subversion/trunk/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/util.c?rev=1208833&r1=1208832&r2=1208833&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/util.c (original)
+++ subversion/trunk/subversion/libsvn_wc/util.c Wed Nov 30 22:12:42 2011
@@ -564,8 +564,12 @@ svn_wc__fetch_props_func(apr_hash_t **pr
scratch_pool);
svn_error_t *err;
- err = svn_wc__db_read_props(props, sfb->db, local_abspath,
- result_pool, scratch_pool);
+ if (sfb->fetch_base)
+ err = svn_wc__db_base_get_props(props, sfb->db, local_abspath, result_pool,
+ scratch_pool);
+ else
+ err = svn_wc__db_read_props(props, sfb->db, local_abspath,
+ result_pool, scratch_pool);
/* If the path doesn't exist, just return an empty set of props. */
if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1208833&r1=1208832&r2=1208833&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Wed Nov 30 22:12:42 2011
@@ -730,6 +730,7 @@ struct svn_wc__shim_fetch_baton_t
{
svn_wc__db_t *db;
const char *base_abspath;
+ svn_boolean_t fetch_base;
};
/* Using a BATON of struct shim_fetch_baton, return KIND for PATH. */
Re: svn commit: r1208833 - in /subversion/trunk/subversion/libsvn_wc:
status.c update_editor.c util.c wc.h
Posted by Hyrum K Wright <hy...@wandisco.com>.
On Thu, Feb 2, 2012 at 7:03 AM, Julian Foad <ju...@btopenworld.com> wrote:
> Julian Foad wrote:
>
>> hwright@apache.org wrote:
>>> URL: http://svn.apache.org/viewvc?rev=1208833&view=rev
>>> Log:
>>> In libsvn_wc, when fetching props for the Ev2 shims, add a flag to the
>>> baton so we can fetch the proper kind of props, either actual or base,
>>> depending on the application.
>>
>> That distinction should obviously apply to fetching the text and the node kind
>> as well, not just the props.
>
> The corresponding functions for fetching the kind and the text (svn_wc__fetch_kind_func(), svn_wc__fetch_base_func()) need updating in the same way, don't they? At the very least, if the implementation doesn't need the base kind or the base text *yet*, they should assert that sfb->fetch_base is false.
They shouldn't ever need updating, I don't think.
fetch_base() is called when we need to know which pristine the server
is sending a delta against. It will always be the pristine, and not
the working version, since the server has no knowledge of the working
version. I *think* the same thing is true for kind, but haven't
completely worked it out.
-Hyrum
--
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/
Re: svn commit: r1208833 - in /subversion/trunk/subversion/libsvn_wc: status.c update_editor.c util.c wc.h
Posted by Julian Foad <ju...@btopenworld.com>.
Julian Foad wrote:
> hwright@apache.org wrote:
>> URL: http://svn.apache.org/viewvc?rev=1208833&view=rev
>> Log:
>> In libsvn_wc, when fetching props for the Ev2 shims, add a flag to the
>> baton so we can fetch the proper kind of props, either actual or base,
>> depending on the application.
>
> That distinction should obviously apply to fetching the text and the node kind
> as well, not just the props.
The corresponding functions for fetching the kind and the text (svn_wc__fetch_kind_func(), svn_wc__fetch_base_func()) need updating in the same way, don't they? At the very least, if the implementation doesn't need the base kind or the base text *yet*, they should assert that sfb->fetch_base is false.
- Julian
Re: svn commit: r1208833 - in /subversion/trunk/subversion/libsvn_wc: status.c update_editor.c util.c wc.h
Posted by Julian Foad <ju...@btopenworld.com>.
hwright@apache.org wrote:
> URL: http://svn.apache.org/viewvc?rev=1208833&view=rev
> Log:
> In libsvn_wc, when fetching props for the Ev2 shims, add a flag to the baton
> so we can fetch the proper kind of props, either actual or base, depending on
> the application.
That distinction should obviously apply to fetching the text and the node kind as well, not just the props.
- Julian