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

Re: Search properties

From: Ryan Schmidt <subversion-2006q2_at_ryandesign.com>
Date: 2006-06-28 18:57:26 CEST

On Jun 28, 2006, at 11:59, H.M. Aamir Yaseen wrote:

>>> I do have same requirement / problem, if someone may guide us in
>>> this regard, this would be a great help.
>>
>> There is currently no way to search properties in Subversion. If you
>> want to be able to search properties, you can write a post-commit
>> hook (and, if you're interested in revision properties, a post-
>> revprop-change hook) which stores the properties in a relational
>> database of your choice (for example MySQL) which you can then search
>> using any tools that work with that database.
>
> Can we search for files/folders in svn against a given property
> (metadata property) ??

I do not believe you can currently do that, no.

> i can rewrite my quetion can we search in svn (as we do in RDBMS)
> like following:
>
> SELECT FILENAME, FOLDERNAME
> FROM PROJECT/PATH/IN/REPOSITORY/PATH
> WHERE ATTRIBUTENAME = "ANY_GIVEN_VALUE";

No, Subversion is not a relational database management system, nor
can it make use of one.

> if we can not do that, can you guide me what can be the alternate,
> as i could not understand your point in last email.

What I meant to suggest is that you can write a script which would
update an RDBMS (any RDBMS of your choosing) with this data, after
every commit. You would write a post-commit hook. Hooks are described
in the book at http://svnbook.org . The post-commit hook runs after
every commit. In the script, you would get the list of properties for
all files that had just been committed, and write that into the
RDBMS. Then you could execute queries against the RDBMS as you wish.

That would take care of versioned properties (properties applied to
files). If you also want to keep track of unversioned properties
(properties applied to revisions) then you might also want a post-
revprop-change hook.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 28 18:59:05 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.