[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 17:11:48 +0200

You're right, and I was wrong.
Yes, I've noticed the bug after running

$ svn propdel svn:eol-style file

And translated_size was untouched.

> Dmitry Pavlenko <pavlenko_at_tmatesoft.com> writes:
> > 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.
> >
> > ]]]
> > [[[
> > 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))
>
> I think the bug will trigger in two cases:
>
> - when the new value of svn:eol-style is equal to the value of
> svn:keywords. This is relatively unimportant since svn:eol-style and
> svn:keywords rarely have the same values.
>
> - when svn:eol-style is deleted and svn:keywords is not set. In this
> case translated_size should be cleared but it is not. What is the
> effect of this bug?
Received on 2012-06-25 17:13:23 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.