You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by NormW <no...@gknw.net> on 2011/10/25 02:50:04 UTC

FYI wc-queries.h - file format questionable?

Hi,
Unsure a 'bug' but when compiling wc-queries.h file with (an oldish) gcc 
for NetWare get 1000's of warnings as shown:

> In file included from D:/Projects/srcs/subversion-1.7.1/subversion/libsvn_wc/entries.c:44:
> D:/Projects/srcs/subversion-1.7.1/subversion/libsvn_wc/wc-queries.h:6:3: warning: multi-line string literals are deprecated
> D:/Projects/srcs/subversion-1.7.1/subversion/libsvn_wc/wc-queries.h:8:3: warning: multi-line string literals are deprecated
> D:/Projects/srcs/subversion-1.7.1/subversion/libsvn_wc/wc-queries.h:10:3: warning: multi-line string literals are deprecated
> D:/Projects/srcs/subversion-1.7.1/subversion/libsvn_wc/wc-queries.h:12:3: warning: multi-line string literals are deprecated
> D:/Projects/srcs/subversion-1.7.1/subversion/libsvn_wc/wc-queries.h:14:3: warning: multi-line string literals are deprecated
[snip]
> D:/Projects/srcs/subversion-1.7.1/subversion/libsvn_wc/wc-queries.h:3156:3: warning: multi-line string literals are deprecated
> D:/Projects/srcs/subversion-1.7.1/subversion/libsvn_wc/wc-queries.h:3158:3: warning: multi-line string literals are deprecated

Unsure if this is still deprecated but it seems like transform_sql.py 
could (should?) do a better job just based on a visual look in the above 
file.

There are a 'small' number of other warnings but can otherwise build all 
of 1.7.1.; mostly just need to get sqlite working on NetWare and all 
will be kosher (again) for NetWare.

Cheers,
Norm

Re: FYI wc-queries.h - file format questionable?

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Wed, Oct 26, 2011 at 9:08 PM, Greg Stein <gs...@gmail.com> wrote:

> On Wed, Oct 26, 2011 at 21:26, Greg Stein <gs...@gmail.com> wrote:
> > On Wed, Oct 26, 2011 at 21:16, NormW <no...@gknw.net> wrote:
> ...
> >> K _NOW_ have correct change as you requested and resulting output file
> is
> >> still ok under WinXP; (I imagine XP Python is aware of line issues of
> >> Windows). A better test would be to see if the platform used to create
> >> wc-queries.h for the source tree creates an acceptable format with your
> >> suggested change.
> >
> > Ah! Very good point.
> >
> > I'll track down how we generate that for the distributions and see what
> gives.
>
> Fixed in r1189580.
>
> Hyrum: do you do releases using the branch code, or trunk? ie. does
> this need to be backported?


I won't comment on whether or not this needs to be backported, only that I
usually use the trunk versions of the release scripts to roll releases.

Though, come to think of it, transform_sql.py isn't a release script, it's
part of the build process which gets pre-executed when rolling tarballs.  So
I will comment: this should be backported; it's analogous to a bug in
configure or the makefile.

-Hyrum


-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

Re: FYI wc-queries.h - file format questionable?

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Greg Stein wrote on Wed, Oct 26, 2011 at 22:08:58 -0400:
> Hyrum: do you do releases using the branch code, or trunk? ie. does
> this need to be backported?
> 

IMO yes, some people build from source.

@All are you using "Reply to all" to keep the list CC'd everywhere?

Re: FYI wc-queries.h - file format questionable?

Posted by Greg Stein <gs...@gmail.com>.
On Wed, Oct 26, 2011 at 21:26, Greg Stein <gs...@gmail.com> wrote:
> On Wed, Oct 26, 2011 at 21:16, NormW <no...@gknw.net> wrote:
...
>> K _NOW_ have correct change as you requested and resulting output file is
>> still ok under WinXP; (I imagine XP Python is aware of line issues of
>> Windows). A better test would be to see if the platform used to create
>> wc-queries.h for the source tree creates an acceptable format with your
>> suggested change.
>
> Ah! Very good point.
>
> I'll track down how we generate that for the distributions and see what gives.

Fixed in r1189580.

Hyrum: do you do releases using the branch code, or trunk? ie. does
this need to be backported?

Cheers,
-g

Re: FYI wc-queries.h - file format questionable?

Posted by Greg Stein <gs...@gmail.com>.
On Wed, Oct 26, 2011 at 21:16, NormW <no...@gknw.net> wrote:
> My Bad...
> On 27/10/2011 9:48 AM, Greg Stein wrote:
>>
>> On Wed, Oct 26, 2011 at 19:34, NormW<no...@gknw.net>  wrote:
>>>
>>> ...
>>>>
>>>> Can you try changing line 132 to include a .strip() in there? It
>>>> should look like:
>>>>         self.output.write('  "%s " \\\n' % line.strip())
>>>
>>> Most certainly of little help with Python testing. Can't run the regular
>>> build system on WinXP so I use the headers supplied in the kit. Installed
>>> python (3.2.2) for the first time 5 mins ago and if I try:
>>
>> Would you mind trying the change with Python 2.7 instead? The script
>> is not compatible with Python 3.x as you've just found :-)
>
> K _NOW_ have correct change as you requested and resulting output file is
> still ok under WinXP; (I imagine XP Python is aware of line issues of
> Windows). A better test would be to see if the platform used to create
> wc-queries.h for the source tree creates an acceptable format with your
> suggested change.

Ah! Very good point.

I'll track down how we generate that for the distributions and see what gives.

Thanks for working with me on this.

Cheers,
-g

Re: FYI wc-queries.h - file format questionable?

Posted by Greg Stein <gs...@gmail.com>.
On Wed, Oct 26, 2011 at 20:45, NormW <no...@gknw.net> wrote:
> On 27/10/2011 9:48 AM, Greg Stein wrote:
>>
>> On Wed, Oct 26, 2011 at 19:34, NormW<no...@gknw.net>  wrote:
>>>
>>> ...
>>>>
>>>> Can you try changing line 132 to include a .strip() in there? It
>>>> should look like:
>>>>         self.output.write('  "%s " \\\n' % line.strip())
>>>
>>> Most certainly of little help with Python testing. Can't run the regular
>>> build system on WinXP so I use the headers supplied in the kit. Installed
>>> python (3.2.2) for the first time 5 mins ago and if I try:
>>
>> Would you mind trying the change with Python 2.7 instead? The script
>> is not compatible with Python 3.x as you've just found :-)
>
> K now have 2.7.2; water gets murky.
> The transform_sql.py now reads as:
>>
>>        self.output.write('  "%s " \\\n' % line.strip)

Oops. You dropped a couple parens: ... line.strip())

Cheers,
-g

Re: FYI wc-queries.h - file format questionable?

Posted by Greg Stein <gs...@gmail.com>.
On Wed, Oct 26, 2011 at 19:34, NormW <no...@gknw.net> wrote:
>...
>> Can you try changing line 132 to include a .strip() in there? It
>> should look like:
>>         self.output.write('  "%s " \\\n' % line.strip())
>
> Most certainly of little help with Python testing. Can't run the regular
> build system on WinXP so I use the headers supplied in the kit. Installed
> python (3.2.2) for the first time 5 mins ago and if I try:

Would you mind trying the change with Python 2.7 instead? The script
is not compatible with Python 3.x as you've just found :-)

Thanks!
-g

Re: FYI wc-queries.h - file format questionable?

Posted by Greg Stein <gs...@gmail.com>.
On Wed, Oct 26, 2011 at 16:37, NormW <no...@gknw.net> wrote:
>...
> What my compiler is grumbling about is more that quoted text continues from
> line to line (and likely not using a \ to do it); the following creates the
> warning:
>>
>>  "SELECT op_depth, repos_id, repos_path, presence, kind, revision,
>> checksum,
>>  " \

Oh! That is definitely wrong. There should be newlines within the
string text (which is the case on my machine).

I wonder if that is due to newline style? ... Looking at the code, I
bet it is. transform_sql splits on '\n'. But I bet there is an extra
'\r' in there causing those newlines.

Can you try changing line 132 to include a .strip() in there? It
should look like:
        self.output.write('  "%s " \\\n' % line.strip())

Stripping off the whitespace should not be a problem since we there is
an extra space added back in, before the closing quote.

>...
> As previous, mention it as an 'experience' rather than a bug as no one else
> seems to have raised it. Just the 2nd format drops my build log for
> subversion from 961k to 62k.

I'd call it a bug, if there are newlines within the quotes. Please try
the above, and see if that fixes it.

Cheers,
-g

Re: FYI wc-queries.h - file format questionable?

Posted by Greg Stein <gs...@gmail.com>.
On Mon, Oct 24, 2011 at 20:50, NormW <no...@gknw.net> wrote:
> Hi,
> Unsure a 'bug' but when compiling wc-queries.h file with (an oldish) gcc for
> NetWare get 1000's of warnings as shown:
>
>> In file included from
>> D:/Projects/srcs/subversion-1.7.1/subversion/libsvn_wc/entries.c:44:
>> D:/Projects/srcs/subversion-1.7.1/subversion/libsvn_wc/wc-queries.h:6:3:
>> warning: multi-line string literals are deprecated

I believe your compiler is broken. The backslash *is* needed at the
end of the line since it is part of a macro definition. If the strings
were in "real" code, then yeah: that backslash would not be needed
(which the warning is trying to tell you, but the warning is wrong in
this context).

>...

Cheers,
-g