You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Arild Fines <ar...@broadpark.no> on 2004/07/15 06:09:02 UTC

Path canonicalization

It seems that svn_path_canonicalize() does not strip off the trailing slash
in certain cases:

T:\>.\svn --version
svn, version 1.1.0 (dev build)
   compiled Jul 15 2004, 02:55:47

Copyright (C) 2000-2004 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet
(http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' schema
  - handles 'https' schema
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' schema
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' schema

T:\>.\svn co file:///repos wc
A  wc\foo.txt
Checked out revision 1.

T:\>.\svn info wc
Path: wc
URL: file:///repos
Repository UUID: c458957f-7bfb-894d-8e1a-dfee8bfa7e60
Revision: 1
Node Kind: directory
Schedule: normal
Last Changed Author: Administrator
Last Changed Rev: 1
Last Changed Date: 2004-07-15 07:57:46 +0200 (Thu, 15 Jul 2004)

T:\>.\svn switch --relocate file:///repos/ svn://localhost/ wc
Assertion failed: is_canonical (base, blen), file
\extlibs\subversion-1.1rc1\sub
version\libsvn_subr\path.c, line 113

The stack trace at this point is attached. I ran a similar scenario in the
scenario, and it appears that svn_path_canonicalize() returns the
svn://localhost/ URL unchanged, despite the docstring stating that it will
remove trailing slashes. The current implementation of svn_path_canonicalize
was introduced in r10133.

--
Arild

AnkhSVN: http://ankhsvn.tigris.org
Blog: http://ankhsvn.com/blog
IRC: irc://irc.freenode.net/ankhsvn

"Weaseling out of things is good. It's what separates us from the other
animals....except weasels." -- Homer Simpson

Re: Path canonicalization

Posted by Ben Reser <be...@reser.org>.
On Wed, Jul 14, 2004 at 11:55:19PM -0700, Ben Reser wrote:
> On Thu, Jul 15, 2004 at 08:09:02AM +0200, Arild Fines wrote:
> > It seems that svn_path_canonicalize() does not strip off the trailing slash
> > in certain cases:
> 
> Yup if the URL only provides a hostname followed by a / then it doesn't
> provide a canonical path.  Ironically there's a test for this but the
> test has the wrong expected output.
> 
> Committing fixes momentarily for this.

Complete in r10317.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Path canonicalization

Posted by Ben Reser <be...@reser.org>.
On Thu, Jul 15, 2004 at 08:09:02AM +0200, Arild Fines wrote:
> It seems that svn_path_canonicalize() does not strip off the trailing slash
> in certain cases:

Yup if the URL only provides a hostname followed by a / then it doesn't
provide a canonical path.  Ironically there's a test for this but the
test has the wrong expected output.

Committing fixes momentarily for this.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: Path canonicalization

Posted by Arild Fines <ar...@broadpark.no>.
Arild Fines wrote:
> I ran a similar scenario in the scenario

In the debugger, that is...

-- 
Arild

AnkhSVN: http://ankhsvn.tigris.org
Blog: http://ankhsvn.com/blog
IRC: irc://irc.freenode.net/ankhsvn

"Weaseling out of things is good. It's what separates us from the other
animals....except weasels." -- Homer Simpson 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org