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

Re: Issue #1901 (double slashes screw things): Patch, and some strategy questions

From: Klaus Rennecke <kre_at_tigris.org>
Date: 2004-06-20 23:00:08 CEST

Shlomi Fish wrote:

> Hi all!
>
> Attached is a proposed patch to Issue #1901:
>
> http://subversion.tigris.org/issues/show_bug.cgi?id=1901
>
> The issue concerns the fact that copying two URLs with double slashes
> in certain places, can cause Subversion to crash with an assertion [...]

Hmm this looks more like a general normalization problem. Two similar,
but distinct cases, recipe with trunk as of today:

tukan:[kre]> svn --version
svn, Version 1.1.0 (dev build)
   übersetzt Jun 20 2004, 18:52:50
[...snip...]
tukan:[kre]> svnadmin create /tmp/1901
tukan:[kre]> svn mkdir -m "" file:///tmp/1901/branches

Revision 1 übertragen.
tukan:[kre]> svn mkdir -m "" file:///tmp/1901/branches/branch1

Revision 2 übertragen.
tukan:[kre]> svn copy -m "" file:///tmp/1901/branches/branch1 file:///tmp/1901/branches/branch1/../branch2
subversion/libsvn_repos/commit.c:114: (apr_err=160028)
svn: Out of date: '/branches/branch1/..' in transaction '3'
tukan:[kre]> svn copy -m "" file:///tmp/1901/branches/branch1 file:///tmp/1901/branches/./branch3
svn: subversion/libsvn_subr/path.c:157: svn_path_join: Zusicherung »is_canonical (component, clen)« nicht erfüllt.
Abgebrochen
  

What is the "Out of date..." message supposed to tell the user?

Some scripts and make-like tools tend to create paths with ../something,
I think it would be good to support them by normalizing the URL path in
a defined manner, like in RFC 2396 http://rfc.net/rfc2396.html#s5.2.
section 5.2. steps 6c-6g

But I don't know on what level that should be done. On the client side,
initial command line processing, seems right to get most consistency of
client side operations with server side, but that's just a feeling. At
least that would allow early error-out for cases of 6g (extra /../
without a preceding segment).

/Klaus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jun 20 23:00:48 2004

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.