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

Re: Patch: add svn_client_get_repos_path

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-03-22 22:08:51 CET

On Tue, 22 Mar 2005, Barry Scott wrote:

> On Mar 21, 2005, at 14:22, C. Michael Pilato wrote:
> > The code doesn't need to check the URL -- the assert is doing so for
> > you. Subversion APIs require canonicalized paths as input, so you
> > need to fix the caller.
> So I take some input from a user, say on the command line and
> the assert is the friendly message... I don't think so.
Of course not. The point is that the APIs expect canonicalized paths. The
caller (your cmdline client or whatever) must ensure that it canonicalizes
the path before giving it to the library. It is the same for, for example,
UTF8 encoding. We don't check everywhere that strings are valid UTF8. We
asume that callers ensure that.

> How do I check a URL to avoid the asserts?
> Can I crash the svn command with bad URL input?
You can try that yourself...

A caller should use svn_path_canonicalize to ensure that paths (including
URLs) are canonicalized.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 22 22:06:03 2005

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.