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

Re: svn find

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-02-20 08:40:22 CET

Find the attached proposal.
It is a search on a repository for a given revision if ignored it is a
search against the HEAD revision.

With regards
Kamesh Jayachandran
Ben Collins-Sussman wrote:
> I have no idea what this thread is about anymore. Searching a working
> copy? Searching a repository?
>
> If the latter, is Kamesh talking about searching just a specific
> revision tree (like HEAD), or searching through all history? Is he
> talking about doing the search from the client or doing it on the
> server?
>
> How about somebody defining the *exact* problem being solved...?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

svn find subcommand
-------------------
Objective
---------
To provide a subcommand 'find' to 'svn' to do most of the operations like
typical 'GNU find' utility from the repository side.

Typical usecases by looking at the 'man find' with that cuts across to
subversion. Ignored few switches which I could not understand at the moment
will add them as I become knowledgeable about those switches.

svn -r rev find repos_url/path [expression]

When -r argument is not given HEAD is assumed.

Expression
----------
1)svn find -mmin +60 repos_url/path
Lists all the nodes which got modified 60 minutes ago. If some files got
modified recently in last 59 minutes it won't be shown.

2)svn find -mmin +60 repos_url/path
Lists all the nodes which got modified in the last 60 minutes.

3)svn find -mmin 60 repos_url/path
Lists all the nodes which got modified exactly 60 minutes ago.

4)svn find -newer repos_url/path
Lists all the nodes which are newer than repos_url/path.

5)svn find -cmin +60 repos_url/path
Lists all the nodes whose properties got modified 60 minutes ago.
If some properties got modified recently in last 59 minutes it won't be shown.

6)svn find -cmin +60 repos_url/path
Lists all the nodes whose properties got modified in the last 60 minutes.

7)svn find -cmin 60 repos_url/path
Lists all the nodes whose properties got modified exactly 60 minutes ago.

8)svn find -cnewer repos_url/path
Lists all the nodes whose properties got modified after repos_url/path got
modified(This is what GNU find document says. Not validated this behaviour or
not sure of its correctness.)

9)Not sure access times can be retrieved from the repository if possible
similar set of '-a' counterparts.

10)svn find -empty repos_url/path
To get a list of nodes which don't have a content.

11)svn find -name pattern repos_url/path
Lists all the nodes matching the pattern under repos_url/path

12)svn find -iname pattern repos_url/path
Lists all the nodes case insensitive matching pattern under repos_url/path

13)svn find -lname pattern repos_url/path
List all the symbolic link nodes whose targets match the pattern.

13)svn find -ilname pattern repos_url/path
List all the symbolic link nodes whose targets match the pattern in a case
insensitive way.

14)svn find -links +4 repos_url/path
Lists all the nodes which has 4 or more linkages.

15)svn find -links -4 repos_url/path
Lists all the nodes which has 4 or less linkages.

16)svn find -links 4 repos_url/path
Lists all the nodes which has exactly 4 linkages.

17)svn find -size n[cwbkMG] repos_url/path
c=1 byte
b=512 byte blocks
w=2byte words
k=kilo bytes
M=mega bytes
G=giga bytes

18)svn find -type [dfl] repos_url/path
d=directory
f=file
l=symbolic link

subversion specific find
------------------------
1)svn find -pname 'property name pattern' repos_url/path
Lists all the nodes which has the properties whose name matches 'property name pattern'
will be listed.

2)svn find -pname 'property name pattern' -pval 'some value pattern' repos_url/path
Lists all the nodes which has the properties whose name matches the 'property
name pattern' and among those matched matches the property value pattern.

3)svn find -content 'file contents pattern' repos_url/path
Lists all the nodes of kind file which has the data of the pattern 'file
contents pattern'.

May be 'ACTIONS' portion of 'GNU find' could be implemented.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Feb 20 08:41:00 2006

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.