Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Compare two C# source trees showing differences and new files - start in root of updated project
- $pwd=(get-location).path;ls *.cs -force -recurse -PipelineVariable file | where fullname -NotMatch '\\obj\\' |% { $old = Join-Path 'path_to_original_code' $file.FullName.SubString($pwd.length) ; if( Test-Path $old ) { $n = get-filehash $file.FullName ; if (($o = Get-FileHash $old) -and $n.hash -ne $o.hash ) { if( $diff = compare-object (gc "$($file.FullName)") (gc $old) ) { '***** ' + $file.FullName ; '' ; } } } else { '+++++ ' + $file.FullName } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement