Permalink
Browse files

p4_files: ignore already deleted files.

  • Loading branch information...
1 parent 9140f97 commit c347be041a221e7f35a14f8039cca91c364b2b80 CNU App User committed Aug 7, 2009
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/tasks/p4.rb
View
@@ -98,8 +98,14 @@ def vc_id(opts = nil)
def p4_files(opts)
p4_root = `p4 files Rakefile`.chomp.sub(%r{/Rakefile#.*$}, '')
- pp p4_root
- opts[:p4_files] ||= `p4 files ...`.gsub(/#.*$/, '').gsub(%r{^#{p4_root}/}, '').split("\n").sort
+ # pp p4_root
+ opts[:p4_files] ||=
+ `p4 files ...`.
+ gsub(%r{^.*#\d+ - delete .*$}, ''). # ignore deleted files
+ gsub(/#.*$/, ''). # remove trailing version
+ gsub(%r{^#{p4_root}/}, ''). # remove p4_root prefix
+ split(/\n+/). # split and remove blank lines
+ sort
end
desc "Display files that should be deleted from p4 based on Manifest"

0 comments on commit c347be0

Please sign in to comment.