You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2005/02/25 00:30:35 UTC
'svn info URL'
On Feb 24, 2005, at 6:13 PM, sussman@tigris.org wrote:
> Author: sussman
> Date: Thu Feb 24 18:13:51 2005
> New Revision: 13144
>
> Log:
> Make 'svn info' work on URLs as well as working-copy items.
>
>
So we have a problem here.
My main strategy for implementing 'svn info URL' is to run
svn_ra_get_dir(), then push the returned svn_dirent_t information back
at the client. For the most part, this is working fine.
But there's a shortcoming in svn_ra_get_dir(): it doesn't return a '.'
entry. This means we're fetching parent entries not just for a file,
but for every directory as well! This has two yucky consequences:
1. 'svn info repos_root_URL' fails. There's no way to get the
svn_dirent_t of '/'!
2. It's inefficient. A directory may have a whole lot of children.
So I'm wondering... should we add a new RA API to fetch a single
svn_dirent_t?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn info URL'
Posted by Ben Collins-Sussman <su...@collab.net>.
On Feb 27, 2005, at 3:01 PM, Peter N. Lundblad wrote:
>>
> Since I already revised every RA function, now is our chance to fix
> such
> mistakes without further revision... I'd say just make it return an
> entry
> for "" and also add a depth argument (we can start with supporting 0
> and
> 1). In libsvn_ra/wrapper_template.h, you can jsut filter out that
> entry.
>
Hm, I think I'd rather wait on the 'depth' argument. There are a
number of places where we want to introduce depth, and I'm thinking it
should be treated as a whole special project. (e.g. defining a new
svn_depth_t enumerated type, and sharing it across a bunch of APIs).
For now, I'm just going to make svn_ra_get_dir() return a "" entry.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn info URL'
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Thu, 24 Feb 2005, Ben Collins-Sussman wrote:
> On Feb 24, 2005, at 6:13 PM, sussman@tigris.org wrote:
>
> > Author: sussman
> > Date: Thu Feb 24 18:13:51 2005
> > New Revision: 13144
> >
> > Log:
> > Make 'svn info' work on URLs as well as working-copy items.
> >
> >
>
> So we have a problem here.
>
...
> But there's a shortcoming in svn_ra_get_dir(): it doesn't return a '.'
> entry. This means we're fetching parent entries not just for a file,
> but for every directory as well! This has two yucky consequences:
>
> 1. 'svn info repos_root_URL' fails. There's no way to get the
> svn_dirent_t of '/'!
>
> 2. It's inefficient. A directory may have a whole lot of children.
>
> So I'm wondering... should we add a new RA API to fetch a single
> svn_dirent_t?
>
Since I already revised every RA function, now is our chance to fix such
mistakes without further revision... I'd say just make it return an entry
for "" and also add a depth argument (we can start with supporting 0 and
1). In libsvn_ra/wrapper_template.h, you can jsut filter out that entry.
We need to extend the protocols as well. For ra_svn, we can just add a
depth argument. No depth means the old behaviour: depth 1 and no "" entry.
...and you're the DAV expert.
Regards,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn info URL'
Posted by Barry Scott <ba...@barrys-emacs.org>.
On Feb 25, 2005, at 22:09, Ben Collins-Sussman wrote:
>
> On Feb 25, 2005, at 3:42 PM, Barry Scott wrote:
>
>> Is this related to why svn_client_ls cannot return info on a URL that
>> is a dir without listing all the contents?
>>
>
> Yes, it's just calling svn_ra_get_dir(), which doesn't return '.' in
> the listing.
Does this mean that after you change svn_ra_get_dir() a version of
svn_client_ls2 could be made
to return details of a dir without listing its contents? This would fix
one of the problems in the client API
functionality.
Barry
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn info URL'
Posted by Ben Collins-Sussman <su...@collab.net>.
On Feb 25, 2005, at 3:42 PM, Barry Scott wrote:
> Is this related to why svn_client_ls cannot return info on a URL that
> is a dir without listing all the contents?
>
Yes, it's just calling svn_ra_get_dir(), which doesn't return '.' in
the listing.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn info URL'
Posted by "C. Michael Pilato" <cm...@collab.net>.
Barry Scott <ba...@barrys-emacs.org> writes:
> Is this related to why svn_client_ls cannot return info on a URL that
> is a dir without listing all the contents?
No, that's more related to our (almost-)global definition of -N as
depth 1 (as opposed to depth 0).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn info URL'
Posted by Barry Scott <ba...@barrys-emacs.org>.
Is this related to why svn_client_ls cannot return info on a URL that
is a dir without listing all the contents?
Barry
On Feb 25, 2005, at 00:40, Branko Čibej wrote:
> Ben Collins-Sussman wrote:
>
>>
>> On Feb 24, 2005, at 6:30 PM, Ben Collins-Sussman wrote:
>>
>>>
>>> 1. 'svn info repos_root_URL' fails. There's no way to get the
>>> svn_dirent_t of '/'!
>>>
>>> 2. It's inefficient. A directory may have a whole lot of
>>> children.
>>>
>>> So I'm wondering... should we add a new RA API to fetch a single
>>> svn_dirent_t?
>>>
>>
>> Btw, another option is to change the behavior of svn_ra_get_dir(),
>> and make it return a '.' entry. This will solve problem #1 above,
>> but not #2. Dunno if this has compatibility consequences, though.
>
> Lots and lots. You'd have to version the function, nobody is expecting
> "." (or rather, "").
>
> -- Brane
>
>
> ---------------------------------------------------------------------
> 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
Re: 'svn info URL'
Posted by Branko Čibej <br...@xbc.nu>.
Ben Collins-Sussman wrote:
>
> On Feb 24, 2005, at 6:30 PM, Ben Collins-Sussman wrote:
>
>>
>> 1. 'svn info repos_root_URL' fails. There's no way to get the
>> svn_dirent_t of '/'!
>>
>> 2. It's inefficient. A directory may have a whole lot of children.
>>
>> So I'm wondering... should we add a new RA API to fetch a single
>> svn_dirent_t?
>>
>
> Btw, another option is to change the behavior of svn_ra_get_dir(), and
> make it return a '.' entry. This will solve problem #1 above, but not
> #2. Dunno if this has compatibility consequences, though.
Lots and lots. You'd have to version the function, nobody is expecting
"." (or rather, "").
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn info URL'
Posted by Ben Collins-Sussman <su...@collab.net>.
On Feb 24, 2005, at 6:30 PM, Ben Collins-Sussman wrote:
>
> 1. 'svn info repos_root_URL' fails. There's no way to get the
> svn_dirent_t of '/'!
>
> 2. It's inefficient. A directory may have a whole lot of children.
>
> So I'm wondering... should we add a new RA API to fetch a single
> svn_dirent_t?
>
Btw, another option is to change the behavior of svn_ra_get_dir(), and
make it return a '.' entry. This will solve problem #1 above, but not
#2. Dunno if this has compatibility consequences, though.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org