in

CodePrairie .NET

South Dakota .NET User Group

chrisortman

Finding deleted files in subversion

So I have to update my wix installer today and I need to remove files that I have deleted from my project. Subversion + Powershell makes this easy

 

svn log -r 4606:HEAD -v | where {$_ -match "^   D"}
 

4606 was revision of the last time I updated the installer, so I ask subversion for all changes since then.

-v tells it to print each path

My where { } checks each line of the output to see if it starts with 3 spaces and a D

 

Comments

 

Sawyer said:

That's a very fancy way of doing:

svn log -r 4606:HEAD -v | perl -nle'print if /^\s+D/'

June 1, 2009 4:14 AM
 

Simon said:

Both of those are fancy ways of doing:

svn log -r 4606:HEAD -v | grep "^   D"

November 25, 2009 11:33 AM
 

Bicycle frame sale said:

Pingback from  Bicycle frame sale

February 23, 2011 6:54 PM
 

Phil Lello said:

If you want to capture the revision a file was deleted in, and are on *NIX, it's also worth trying

svn log -v . | awk '

/^r[0-9]* \|/ { REVISION=$1; }

/  D/ { print REVISION": "$0; }

'

September 28, 2011 1:29 PM
 

How do I find if a file have ever existed in a svn-repo? - DexPage said:

Pingback from  How do I find if a file have ever existed in a svn-repo? - DexPage

July 26, 2015 5:14 PM

Leave a Comment

(required)
(optional)
(required)
Add
Powered by Community Server (Commercial Edition), by Telligent Systems