1 --- cvsspam/svn_post_commit_hook.rb~ 2009-03-04 22:22:15.000000000 +0200
2 +++ cvsspam/svn_post_commit_hook.rb 2009-03-04 23:07:24.382496937 +0200
4 unless FileTest.directory?($repository)
5 usage("no such directory: #{$repository.inspect}")
7 - $repository =~ /([^\/]+$)/
11 # runs the given svnlook subcommand
15 out.puts "#V #{prev_rev},#{next_rev}"
16 - out.puts "#M #{$shortrepo}/#{path}"
17 + out.puts "#M #{path}"
18 out.puts "#U diff x x"
19 out.puts "#U Binary files x and y differ"
24 out.puts "#V #{prev_rev},#{next_rev}"
25 - out.puts "#M #{$shortrepo}/#{path}"
26 + out.puts "#M #{path}"
27 out.puts "#U #{diff1}"
28 out.puts "#U #{diff2}"
29 while lines.next_line && lines.current =~ /^[-\+ @\\]/
31 def process_added_binary_diff(out, lines, path)
33 out.puts "#V NONE,#{next_rev}"
34 - out.puts "#A #{$shortrepo}/#{path}"
35 + out.puts "#A #{path}"
36 out.puts "#U diff x x"
37 out.puts "#U Binary file x added"
42 out.puts "#V NONE,#{next_rev}"
43 - out.puts "#A #{$shortrepo}/#{path}"
44 + out.puts "#A #{path}"
45 out.puts "#U #{diff1}"
46 out.puts "#U #{diff2}"
47 while lines.next_line && lines.current =~ /^[-\+ @\\]/
51 out.puts "#V #{prev_rev},NONE"
52 - out.puts "#R #{$shortrepo}/#{path}"
53 + out.puts "#R #{path}"
54 out.puts "#U #{diff1}"
55 out.puts "#U #{diff2}"
56 while lines.next_line && lines.current =~ /^[-\+ @\\]/
58 lines.assert_next(/^_+$/)
59 return unless lines.next_line
60 out.puts "#V #{prev_rev},#{next_rev}"
61 - out.puts "#P #{$shortrepo}/#{path}"
62 + out.puts "#P #{path}"
63 # The first three get consumed and not highlighted
65 out.puts "#U Property changes:"
67 def handle_copy(out, lines, path, from_ref, from_file)
70 - out.puts "#V #{$shortrepo}/#{from_file}:#{prev_rev},#{next_rev}"
71 - out.puts "#C #{$shortrepo}/#{path}"
72 + out.puts "#V #{from_file}:#{prev_rev},#{next_rev}"
73 + out.puts "#C #{path}"
74 if lines.next_line && lines.current =~ /^=+$/
75 m = lines.assert_next(/^---.*\(rev (\d+)\)$/)
81 - out.puts "#U Copied from #{$shortrepo}/#{from_file}:#{from_ref}"
82 + out.puts "#U Copied from #{from_file}:#{from_ref}"