You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by SteveKing <st...@gmx.ch> on 2004/09/27 11:47:40 UTC
svn ls bug in RC3
Hi,
Because I got a bug report for TSVN which I tried to fix I found that
this is a bug in the Subversion library. So I'm reporting this here:
If a directory contains "special" chars like öäü in it, 'svn ls' returns
not only the contents of that directory, but the directory itself too.
Example:
http://localhost/svn/test/testparent/öäüÄÖÜ
http://localhost/svn/test/testparent/öäüÄÖÜ/file1.txt
now:
svn ls http://localhost/svn/test/testparent
returns
öäüÄÖÜ
as expected. But an
svn ls http://localhost/svn/test/testparent/öäüÄÖÜ
returns
öäüÄÖÜ/
file1.txt
I also tried this with the 1.0.6 client, and there the the öäüÄÖÜ Folder
in the second 'svn ls' isn't returned.
(both tests against an RC3 Subversion server, running Apache 2.0.50)
Don't know where and when this changed, but it should at least be
consistend, i.e. either always return the requested folder or never.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn ls bug in RC3
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Mon, 27 Sep 2004, Philip Martin wrote:
> SteveKing <st...@gmx.ch> writes:
>
> > svn ls http://localhost/svn/test/testparent
> > returns
> > öäüÄÖÜ
> >
> > as expected. But an
> > svn ls http://localhost/svn/test/testparent/öäüÄÖÜ
> > returns
> > öäüÄÖÜ/
> > file1.txt
>
> There is an inconsistency with the alphabetic case used when URI
> encoding:
>
[...]
> strcmp will treat those URLs as different.
>
> Now Subversion's path.c:uri_escape() uses sprintf("%%%02X") so it should
> produce upper case, however the server sends lower case
>
[...]
> I'm not sure where that gets produced, but Apache's util.c:c2x() uses
> c2x_table[] = "0123456789abcdef" so it could be that.
>
> A quick fix might be to make Subversion use lower case, a less fragile
> fix would be to compare URLs using a function that handles escape
> sequences that differ in case.
>
I don't like comparing URLs using strcmp-like functions, since
URI-encoding differences can make this fail in many ways. Also, I don't
know WebDAV well enough to know if this proposal is acceptable. What about
counting the number of components in the returned URLs and skipping an URL
with as many components the input path? Does WebDAV guarantee that the
URLs of a collection have proper pathnames, i.e. collectionURL/name?
Any DAV-expert want to give an advice?
Regards,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn ls bug in RC3
Posted by Philip Martin <ph...@codematters.co.uk>.
SteveKing <st...@gmx.ch> writes:
> svn ls http://localhost/svn/test/testparent
> returns
> öäüÄÖÜ
>
> as expected. But an
> svn ls http://localhost/svn/test/testparent/öäüÄÖÜ
> returns
> öäüÄÖÜ/
> file1.txt
There is an inconsistency with the alphabetic case used when URI
encoding:
Breakpoint 4, svn_ra_dav__get_dir (session_baton=0x8099d70,
path=0x40039131 "", revision=3, dirents=0xbffff80c, fetched_rev=0x0,
props=0x0, pool=0x808b1f8) at ../svn/subversion/libsvn_ra_dav/fetch.c:919
919 if (strcmp(resource->url, stripped_final_url) == 0)
(gdb) p resource->url
$8 = 0x80a1248 "/obj/repo/!svn/bc/3/f%c3%a3o"
(gdb) p stripped_final_url
$9 = 0x80a22e0 "/obj/repo/!svn/bc/3/f%C3%A3o"
strcmp will treat those URLs as different.
Now Subversion's path.c:uri_escape() uses sprintf("%%%02X") so it should
produce upper case, however the server sends lower case
<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:ns1="http://subversion.tigris.org/xmlns/dav/" xmlns:ns0="DAV:">
<D:response xmlns:lp1="DAV:" xmlns:lp2="http://subversion.tigris.org/xmlns/dav/">
<D:href>/obj/repo/f%c3%a3o/</D:href>
<D:propstat>
<D:prop>
I'm not sure where that gets produced, but Apache's util.c:c2x() uses
c2x_table[] = "0123456789abcdef" so it could be that.
A quick fix might be to make Subversion use lower case, a less fragile
fix would be to compare URLs using a function that handles escape
sequences that differ in case.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn ls bug in RC3
Posted by kf...@collab.net.
SteveKing <st...@gmx.ch> writes:
> > Steve, can you file an issue for this, linking to both your mail and
> > Philip's followup?
>
> Filed as issue 2060.
And excellently, too! The presentation is a model of clarity, thanks
for taking the time.
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn ls bug in RC3
Posted by SteveKing <st...@gmx.ch>.
kfogel@collab.net wrote:
> Steve, can you file an issue for this, linking to both your mail and
> Philip's followup?
Filed as issue 2060.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn ls bug in RC3
Posted by kf...@collab.net.
Steve, can you file an issue for this, linking to both your mail and
Philip's followup?
Thanks,
-K
SteveKing <st...@gmx.ch> writes:
> Because I got a bug report for TSVN which I tried to fix I found that
> this is a bug in the Subversion library. So I'm reporting this here:
>
> If a directory contains "special" chars like öäü in it, 'svn ls'
> returns not only the contents of that directory, but the directory
> itself too.
> Example:
>
> http://localhost/svn/test/testparent/öäüÄÖÜ
> http://localhost/svn/test/testparent/öäüÄÖÜ/file1.txt
>
> now:
> svn ls http://localhost/svn/test/testparent
> returns
> öäüÄÖÜ
>
> as expected. But an
> svn ls http://localhost/svn/test/testparent/öäüÄÖÜ
> returns
> öäüÄÖÜ/
> file1.txt
>
> I also tried this with the 1.0.6 client, and there the the öäüÄÖÜ
> Folder in the second 'svn ls' isn't returned.
> (both tests against an RC3 Subversion server, running Apache 2.0.50)
>
> Don't know where and when this changed, but it should at least be
> consistend, i.e. either always return the requested folder or never.
>
> Stefan
>
> --
> ___
> oo // \\ "De Chelonian Mobile"
> (_,\/ \_/ \ TortoiseSVN
> \ \_/_\_/> The coolest Interface to (Sub)Version Control
> /_/ \_\ http://tortoisesvn.tigris.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org