views:

158

answers:

3

Background: writing an automated release script to export changed files between versions from SVN and upload to remote server.

The svn log command shows modified files and properties, but seems to not distinguish its verbose output between a content modification over property modifications.

Am I reading this output wrong, or is there an easy way to get a list of changed files between revisions whilst ignoring prop changes

Here's my sample cmd:

#: svn log "someurl" -r 2210:HEAD -v -q

Output:
------------------------------------------------------------------------
r2211 | author | 2010-02-08 12:36:56 +1300 (Mon, 08 Feb 2010)
Changed paths:
   M /branches/project/release-v1-r-maintenance
   M /branches/project/release-v1-r-maintenance/offroot/
   M /branches/project/release-v1-r-maintenance/offroot/test.config
------------------------------------------------------------------------

The top two are only prop changes (mergeinfo, ignores, etc), whereas the 3rd item is an actual content edit and this is the real item that I want to grab to avoid exporting whole root all over.

Is there anyway to get/filter out just the content changes from the svn log or other command.

A: 

Does this work?

svn log --xml --with-no-revprops
Maxwell Troy Milton King
no it doesn't. this only influences "revision" properties
jeroenh
My svn server is version 1.5.1and --with-no-revprops is not available on svn-log cmd.Is this a newer feature? Time to upgrade my repo?
Dan
@Dan: yes, it's a new feature in 1.6
jeroenh
+1  A: 

I think the only way is to actually parse the diff output for each revistion, though that seems rather brittle, and probably very slow...

This is how a diff entry looks for a file with only changed properties:

c:\test\wc>svn diff -c 3

Property changes on: test.txt
___________________________________________________________________
Added: test
   + test

This is how a diff entry looks for a file with changed contents AND changed properties:

c:\test\wc>svn diff -c 4
Index: test.txt
===================================================================
--- test.txt    (revision 3)
+++ test.txt    (revision 4)
@@ -1 +1,2 @@

+asdfads

Property changes on: test.txt
___________________________________________________________________
Added: someproperty
   + somepropertyvalue
jeroenh
Yeh, was sort of avoiding that answer since the output seems messy and possibly unreliable. Although this is probably the only option unless anyone else has some ideas.Assuming the 'Index: <filename>' string always appears when there's a content change, then I guess there's some scope for parsing.Hmm, thanks for the input.
Dan
+2  A: 

FYI, I posted a bash script over at How to make ‘svn log’ ignore property changes? that implements what jeroenh was alluding to... processing the output of svn log to drive svn diff and filtering on the output of the latter.

LarsH