[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: Dale Worley <dworley_at_pingtel.com>
Date: 2005-01-06 17:47:25 CET

--------------------------------------
I need to identify all files that have a specific property that have changed
between specific revisions of the repository.
--------------------------------------

This is probably more efficient, since it uses recursion within Subversion
rather than invoking Subversion repeatedly. But you could probably make the
first step faster (and more accurate) by doing "svn log -v -r... ..." and
extracting the file names.

Dale

REV1=xxx
REV2=xxx
DIR=xxx
PROP=xxx

# Get the list of files that have been changed between $REV1 and $REV2.
svn diff -r$REV1:$REV2 --diff-cmd=/bin/true $DIR |
 sed -e '/^Index: /!d' -e 's/^Index: //' |
 sort >/tmp/1
# Get the list of files that have property $PROP
svn propget -R $PROP $DIR |
 sed -e '/ - /!d' -e 's/ - .*$//' |
 sort >/tmp/2
comm -12 /tmp/1 /tmp/2
Received on Thu Jan 6 17:53:01 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.