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

Re: [PATCH] Wrong condition is checked to understend whether to reset translated_size value in NODES table

From: Dmitry Pavlenko <pavlenko_at_tmatesoft.com>
Date: Mon, 25 Jun 2012 16:43:17 +0200

Not true. It was comparing old and new values of svn:keywords but should compare old and new values
of svn:eol-style.

Ok, I got the idea of high-level problem.

> On Mon, Jun 25, 2012 at 04:03:42PM +0200, Dmitry Pavlenko wrote:
> > I would also ask you to add the fix to 1.7.x
> >
> > [[[
> > Fix a typo that could lead to wrong translated_size value.
> > if svn:eol-style is locally changed and svn:keywords is not,
> > translated_size wasn't reset.
> >
> > * subversion/libsvn_wc/props.c
> >
> > (do_propset): SVN_PROP_EOL_STYLE value should be checked, not
> > SVN_PROP_KEYWORDS.
> >
> > ]]]
>
> The fix is correct. I've committed it using the above log message.
>
> I think it might be better to explain the problem at a higher level in the
> first part of the log message. From reading the log message and the code
> in do_propset() it's not clear what translated_size is referring to.
>
> Maybe something like this?
>
> [[[
> 'svn propset' was comparing the new value of svn:eol-style to the
> svn:keywords property, rather than the old value of the svn:eol-style
> property. This could prevent an update of cached values related to
> EOL expansion in wc.db.
>
> * subversion/libsvn_wc/props.c
> (do_propset): Use SVN_PROP_EOL_STYLE instead of SVN_PROP_KEYWORDS
> to obtain the value of the svn:eol-style property from prophash.
> ]]]
>
> > [[[
> > Index: subversion/libsvn_wc/props.c
> > ===================================================================
> > --- subversion/libsvn_wc/props.c (revision 1353527)
> > +++ subversion/libsvn_wc/props.c (working copy)
> > @@ -2315,7 +2315,7 @@ do_propset(svn_wc__db_t *db,
> >
> > }
> >
> > else if (kind == svn_node_file && strcmp(name, SVN_PROP_EOL_STYLE) ==
> > 0)
> >
> > {
> >
> > - svn_string_t *old_value = apr_hash_get(prophash,
> > SVN_PROP_KEYWORDS, + svn_string_t *old_value =
> > apr_hash_get(prophash, SVN_PROP_EOL_STYLE,
> >
> > APR_HASH_KEY_STRING);
> >
> > if (((value == NULL) != (old_value == NULL))
> >
> > ]]]
Received on 2012-06-25 16:44:55 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.