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

Re: Identifying changed files containing a specific property

From: David Kramer <david_at_thekramers.net>
Date: 2005-01-06 17:25:17 CET

On Thu, 6 Jan 2005, Don Smith wrote:

> Hi,
> I need to identify all files that have a specific property that have
> changed between specific revisions of the repository. This is to
> identify all files that require localization (L10N) which have changed
> since a specific revision, so they can be sent back to the translators.
> I put a property on each file that requires translation, L10N. The end
> goal is to write an Ant script that will generate an archive of the
> files to be sent to the translators.
> So far I've come up with this bash script:
> svn diff -r1:23 | grep +++ | cut -c 5- | cut -f 1 | while read f
> do
> echo 'Processing file ' $f
> X="$(/usr/bin/svn propget L10N $f)"
> if [ "$X" = "true" ]; then
> echo 'L10N file'
> fi
> done
> This gets a list of all the files that have changed (the diff plus grep
> and cut commands), then for each file gets the value of the L10N
> property. If the value is true, I know it's a file that requires
> translation, and it has changed.

I posted a similar question yesterday or the day before. Subversion
really doesn't have an efficient mechanism for listing files that have a
certain property.

My solution was similar to yours, except I did a propget on all of the
files in one command then cut the filename out. Propget will only list
files that have that property. I assume the L10N property is not set on
non-localized files.

svn diff -r1:23 | grep +++ | cut -c 5- | cut -f 1 \
    | xargs svn propget L10N | awk '{print $1}'

DDDD David Kramer david_at_thekramers.net http://thekramers.net
DKK D "Music expresses that which cannot be said
DK KD and on which it is impossible to be silent."
DDDD - Victor Hugo

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jan 6 17:32:46 2005

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.