1 Index: collect_diffs.rb
2 ===================================================================
3 RCS file: /var/lib/cvs/cvsspam/collect_diffs.rb,v
4 retrieving revision 1.22
5 diff -u -r1.22 collect_diffs.rb
6 --- collect_diffs.rb 22 Dec 2004 13:41:25 -0000 1.22
7 +++ collect_diffs.rb 20 Feb 2005 01:01:08 -0000
9 # record version information
10 file.puts "#V #{change.fromVer},#{change.toVer}"
12 + # remember that the 'binary' option was set for this file
14 # note if the file is on a branch
18 if status =~ /^\s*Sticky Tag:\s*(.+) \(branch: +/m
22 + if status =~ /^\s*Sticky Options:\s*-kb/m
26 file.puts "#T #{tag}" unless tag.nil?
30 file.puts "#{$repository_path}/#{change.file}"
31 diff_cmd << change.file
32 - # do a cvs diff and place the output into our temp file
33 - blah("about to run #{diff_cmd.join(' ')}")
34 - safer_popen(*diff_cmd) do |pipe|
35 - # skip over cvs-diff's preamble
37 - break if line =~ /^diff /
39 - file.puts "#U #{line}"
41 - file.puts "#U #{line}"
44 + blah("not diffing #{change.file}; has -kb set")
45 + # fake diff lines that will cause cvsspam.rb to consider this a binary
47 + file.puts "#U diff x x"
48 + file.puts "#U Binary files x and y differ"
50 + # do a cvs diff and place the output into our temp file
51 + blah("about to run #{diff_cmd.join(' ')}")
52 + safer_popen(*diff_cmd) do |pipe|
53 + # skip over cvs-diff's preamble
55 + break if line =~ /^diff /
57 + file.puts "#U #{line}"
59 + file.puts "#U #{line}"
63 # TODO: don't how to do this reliably on different systems...
64 #fail "cvsdiff did not give exit status 1 for invocation: #{diff_cmd.join(' ')}" unless ($?>>8)==1