You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Poul Nielsen <po...@langhuse.dk> on 2006/09/26 06:58:31 UTC

Good script to traverse the repo listing/looking for properties

Wanted:
- add properties to files - thereby grouping files
- the properties can then be used to perform actions when publishing the 
repository, like generating PDF files from documents etc.

Properties looks perfect for the job, setting them is easy. The problems 
start when you want to automate because it looks like access to 
properties is very simple/limited.


Q: how do you list all properties found in all files ?

Q: how do you get a file list of files holding a specific properties or 
property/property value ?

It would be useful to be able to add "--recursive" to most of the 
"svnlook prop?? " commands or maybe even better allow wildcards in the 
REPO_PATH like '/trunk/*'

Is the only way using
	svnlook tree --full-paths /
and generate a filelist from the list returned ?

Anybody with some useful scripts (bash/perl) ?

How could a hook script be used here ?



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

Re: Good script to traverse the repo listing/looking for properties

Posted by Poul Nielsen <po...@langhuse.dk>.
Poul Nielsen skrev:
> Wanted:
> - add properties to files - thereby grouping files
> - the properties can then be used to perform actions when publishing the 
> repository, like generating PDF files from documents etc.
> 
> Properties looks perfect for the job, setting them is easy. The problems 
> start when you want to automate because it looks like access to 
> properties is very simple/limited.
> 
> 
> Q: how do you list all properties found in all files ?
> 
> Q: how do you get a file list of files holding a specific properties or 
> property/property value ?
> 
> It would be useful to be able to add "--recursive" to most of the 
> "svnlook prop?? " commands or maybe even better allow wildcards in the 
> REPO_PATH like '/trunk/*'
> 
> Is the only way using
>     svnlook tree --full-paths /
> and generate a filelist from the list returned ?
> 
> Anybody with some useful scripts (bash/perl) ?
> 
> How could a hook script be used here ?

To answer myself

The "svn ls/proplist/propget -R REPO_PATH" does most if not all of what 
I want.
Importantly these commands can also be done locally - without working on 
the server (very much preferred).


Thanks for an incredible fine tool :-)

Poul

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

Re: Good script to traverse the repo listing/looking for properties

Posted by Andy Levy <an...@gmail.com>.
On 9/26/06, Poul Nielsen <po...@langhuse.dk> wrote:
> Wanted:
> - add properties to files - thereby grouping files
> - the properties can then be used to perform actions when publishing the
> repository, like generating PDF files from documents etc.
>
> Properties looks perfect for the job, setting them is easy. The problems
> start when you want to automate because it looks like access to
> properties is very simple/limited.
>
>
> Q: how do you list all properties found in all files ?
>
> Q: how do you get a file list of files holding a specific properties or
> property/property value ?
>
> It would be useful to be able to add "--recursive" to most of the
> "svnlook prop?? " commands or maybe even better allow wildcards in the
> REPO_PATH like '/trunk/*'
>
> Is the only way using
>         svnlook tree --full-paths /
> and generate a filelist from the list returned ?
>
> Anybody with some useful scripts (bash/perl) ?
>
> How could a hook script be used here ?

A hook script to apply properties?  Modifying a transaction in-flight
will result in the committer not having an up to date working copy
immediately after commit.  The general guideline is to not modify
transactions in hook scripts.

Have a look at svn_apply_autoprops.py, it will traverse a working copy
and apply all properties that are definedin your [auto-props]

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