How can I search if a file named foo.txt was ever committed to my svn repositroy (in any revision)?
views:
1859answers:
2
+3
A:
This should work for you:
svn log -r 0:HEAD -v $REPOSITORY_PATH | grep "/foo.txt"
This will give you the paths to the files and the state from the log. If you get any hits, you know it existed at some point. If you get no results, there is nothing matching anywhere in the repository at any revision. You'll also see the states from each log line, e.g.:
A /some/path/foo.txt D /some/path/foo.txt
But I'm guessing the extra info isn't a problem for you. :)
Adam Bellaire
2008-12-24 16:10:51
That'd work. You could filter for the first occurrence with 'svn ... | grep /foo.txt | head -1'
orip
2008-12-24 16:34:28