ftlog
ftlog

Reputation: 11

Is there a way that subversion can show me the history of a list of files?

I have a list of source files and want to know when they were last modified. Using subversion, is there a way that I can find the history or when a file was last modified, for a long list of files, in an automated way? I only know how to do it on an individual basis, which will take forever for this list!

Thank you.

Upvotes: 1

Views: 60

Answers (2)

trent
trent

Reputation: 341

In addition to the blame and info commands mentioned above, you can also use "svn log". And no matter what you'll need to loop over the list of files and transform the output.

For example, assuming that you have the list of files in a file, you can do something like this:

cat filelist | while read i; do echo $i `svn log -l1 findremote.pl | awk 'NR == 2 {print $5, $6, $7 }'`; done

Of course, you'll need to massage that output further into whatever format you like.

Note that all of these commands will tell you about the version present in your workspace. If you need the latest in the repository, you'll need to add a -rHEAD or something like that. Or make sure your workspace is updated before running the command.

Upvotes: 1

Rahul Tripathi
Rahul Tripathi

Reputation: 172608

You are probably looking for

svn blame filename

Also

svn info -r revision-number file-path

Upvotes: 1

Related Questions