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

svn_path_is_url()

From: David Mankin <mankin_at_ants.com>
Date: 2002-11-26 17:11:42 CET

Hi,
I was working on optimizing some code and I tried to fix
svn_path_is_url. But now my change is failing with this message in
tests.log:
   svn: svn_path_is_url (://blah/blah) returned FALSE instead of TRUE

My question is, is my code wrong, or the test wrong? That doesn't look
like a valid URL to me. The comment IN svn_path_is_url claims that a
valid URL is:
   (scheme)://(optional_stuff)

That seems that scheme should be non-blank. Which is what my
implementation ensures, but then the test fails.

The comment in svn_path.h isn't any more help; it appears to be just
plain wrong:
/* Compare PATH to an array of const char * URL SCHEMES (like "file",
    "http", etc.) to determine if PATH looks like a URL. If so, return
    the matching scheme used by PATH, else return NULL. Returned
    values point to the allocations in SCHEMES. */
svn_boolean_t svn_path_is_url (const char *path);

Anyone have any comments? I'm inclined to fix the comment in
svn_path.h, and then fix the test case so it thinks ://blah/blah is
invalid.

-David Mankin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 26 17:13:07 2002

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.