You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Alexy Khrabrov <al...@setup.org> on 2002/08/01 04:06:10 UTC

[PATCH] http://svn.host.tld

* subversion/libsvn_subr/path.c
  (svn_path_is_url) assumed that URL has to have 3 slashes,
  which may not hold for top-level locations such as http://svn.host.tld
  which istill should be able to be typed in without the trailing slash.

--
Problem description:

When hosting SVN at the top level, such as http://svn.host.tld,
you really want to give commands such as svn ls http://svn.host.tld
-- which previously failed immediately in the client as a URL was
supposed to have 3 slashes.  Two is enough, this validation is dumb
anyways.  The patch follows.  _Together_ with my previous patches, it
finally allows to host an SVN repository at the top level and operate
on it with the command line svn client.

Cheers,
Alexy

Index: subversion/libsvn_subr/path.c
===================================================================
--- subversion/libsvn_subr/path.c
+++ subversion/libsvn_subr/path.c	Wed Jul 31 23:57:40 2002
@@ -774,8 +774,7 @@
       /* Expecting the next two chars to be '/', and somewhere
          thereafter another '/'. */
       if ((path[j + 1] == '/')
-          && (path[j + 2] == '/')
-          && (strchr (path + j + 3, '/') != NULL))
+          && (path[j + 2] == '/'))
         return TRUE;
       
       return FALSE;

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

Re: [PATCH] http://svn.host.tld

Posted by Scott Lamb <sl...@slamb.org>.
Alexy Khrabrov wrote:
> --- subversion/libsvn_subr/path.c
> +++ subversion/libsvn_subr/path.c	Wed Jul 31 23:57:40 2002
> @@ -774,8 +774,7 @@
>        /* Expecting the next two chars to be '/', and somewhere
>           thereafter another '/'. */

Could you fix or remove the comment?

>        if ((path[j + 1] == '/')
> -          && (path[j + 2] == '/')
> -          && (strchr (path + j + 3, '/') != NULL))
> +          && (path[j + 2] == '/'))
>          return TRUE;
>        
>        return FALSE;


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

Re: [PATCH] http://svn.host.tld

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Thanks for this patch, and the other one, Alexy!

Will review & apply as soon as can, if no one else beats us to it.
Sorry about the lag time here; it's unavoidable.

-K

Alexy Khrabrov <al...@setup.org> writes:
> * subversion/libsvn_subr/path.c
>   (svn_path_is_url) assumed that URL has to have 3 slashes,
>   which may not hold for top-level locations such as http://svn.host.tld
>   which istill should be able to be typed in without the trailing slash.
> 
> --
> Problem description:
> 
> When hosting SVN at the top level, such as http://svn.host.tld,
> you really want to give commands such as svn ls http://svn.host.tld
> -- which previously failed immediately in the client as a URL was
> supposed to have 3 slashes.  Two is enough, this validation is dumb
> anyways.  The patch follows.  _Together_ with my previous patches, it
> finally allows to host an SVN repository at the top level and operate
> on it with the command line svn client.
> 
> Cheers,
> Alexy
> 
> Index: subversion/libsvn_subr/path.c
> ===================================================================
> --- subversion/libsvn_subr/path.c
> +++ subversion/libsvn_subr/path.c	Wed Jul 31 23:57:40 2002
> @@ -774,8 +774,7 @@
>        /* Expecting the next two chars to be '/', and somewhere
>           thereafter another '/'. */
>        if ((path[j + 1] == '/')
> -          && (path[j + 2] == '/')
> -          && (strchr (path + j + 3, '/') != NULL))
> +          && (path[j + 2] == '/'))
>          return TRUE;
>        
>        return FALSE;
> 
> ---------------------------------------------------------------------
> 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