You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Robert Zeh <rz...@efs-us.com> on 2004/07/09 13:11:59 UTC

Are there any plans for an svn find command?

Are there any plans for a way to do a search for filenames inside of a 
repository?  I like something similar to the unix find command, but for 
the repository instead.

Thanks,
Robert Zeh


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

Re: Are there any plans for an svn find command?

Posted by Eric Wilhelm <ew...@sbcglobal.net>.
# The following was supposedly scribed by
# Robert Zeh
# on Friday 09 July 2004 10:25 am:

>> What about a small script?
>>
>> tukan:[kre]> cat svnfind
>> #! /bin/sh
>> target="$1"
>> shift
>> svn ls -R "$target" | egrep -e "$@"
>> tukan:[kre]>
>>
>> will that do? Over the net it creates some overhead, but if your
>> repository is not far that's not a problem.
>>
>> /Klaus
>
>The script is a good idea.  However, until svn ls is streaming, this
>script won't work well with my repository.  svn ls -R <root> on my
>repository never finishes; my machine runs out of swap.

In that case, you'll need a recursive subroutine which does 'svn ls -v <root>' 
and then follows into each directory in turn (using memory only for that 
directory's contents.)  The svn startup load would be troublesome, but what 
about using the Perl bindings?

--Eric
-- 
"I hate everyone...I just hate some people less."
                                        -- Robb Woods

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


Re: Are there any plans for an svn find command?

Posted by Klaus Rennecke <kr...@tigris.org>.
Robert Zeh wrote:
> Klaus Rennecke wrote:
>> [...]
>> #! /bin/sh
>> target="$1"
>> shift
>> svn ls -R "$target" | egrep -e "$@"
> 
> [...]   svn ls -R <root> on my
> repository never finishes; my machine runs out of swap.

Oh that's nasty. I haven't run it on a real large repository yet. But I 
noticed that there's a pause before output starts rolling. Let's hope 
that 1.1 will be able to help you out.

For what it's worth, I tend to create more repositories as I used to 
with CVS. I like to decouple the version numbers of stuff that's not 
really related. Thus, I have quite a bunch of repositories, but none is 
overly large in itself.

/Klaus

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

Re: Are there any plans for an svn find command?

Posted by Robert Zeh <rz...@efs-us.com>.
Klaus Rennecke wrote:

> Robert Zeh wrote:
>
>> Are there any plans for a way to do a search for filenames inside of 
>> a repository?  I like something similar to the unix find command, but 
>> for the repository instead.
>>
>
> What about a small script?
>
> tukan:[kre]> cat svnfind
> #! /bin/sh
> target="$1"
> shift
> svn ls -R "$target" | egrep -e "$@"
> tukan:[kre]>
>
> will that do? Over the net it creates some overhead, but if your 
> repository is not far that's not a problem.
>
> /Klaus

The script is a good idea.  However, until svn ls is streaming, this 
script won't work well with my repository.  svn ls -R <root> on my 
repository never finishes; my machine runs out of swap.

Robert

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

Re: Are there any plans for an svn find command?

Posted by Klaus Rennecke <kr...@tigris.org>.
Robert Zeh wrote:
> Are there any plans for a way to do a search for filenames inside of a 
> repository?  I like something similar to the unix find command, but for 
> the repository instead.
> 

What about a small script?

tukan:[kre]> cat svnfind
#! /bin/sh
target="$1"
shift
svn ls -R "$target" | egrep -e "$@"
tukan:[kre]>

will that do? Over the net it creates some overhead, but if your 
repository is not far that's not a problem.

/Klaus

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

Re: Are there any plans for an svn find command?

Posted by Robert Zeh <rz...@efs-us.com>.
Ben Collins-Sussman wrote:

>On Fri, 2004-07-09 at 08:11, Robert Zeh wrote:
>  
>
>>Are there any plans for a way to do a search for filenames inside of a 
>>repository?  I like something similar to the unix find command, but for 
>>the repository instead.
>>    
>>
>
>No plans that I've heard of.  But the repository exports a filesystem
>API, so it should be easy to write something like this.  You could even
>do it using the perl or python API bindings.
>
>
>  
>
Would it be possible to place the find on the server side of things?  My 
limited
experience is that it's better to execute the query on the server and
stream the results back.  Otherwise you end up sending more data over
the network then you have to.  My experience is the network is the
bottleneck, but most of my experience is with financial systems, not
version control systems...

Robert


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

Re: Are there any plans for an svn find command?

Posted by Ben Collins-Sussman <su...@collab.net>.
On Fri, 2004-07-09 at 08:11, Robert Zeh wrote:
> Are there any plans for a way to do a search for filenames inside of a 
> repository?  I like something similar to the unix find command, but for 
> the repository instead.

No plans that I've heard of.  But the repository exports a filesystem
API, so it should be easy to write something like this.  You could even
do it using the perl or python API bindings.



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