]> git.pld-linux.org Git - packages/cvsspam.git/blob - cvsspam-svn-noshortrepo.patch
- svn patch support
[packages/cvsspam.git] / cvsspam-svn-noshortrepo.patch
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
3 @@ -88,8 +88,6 @@
4    unless FileTest.directory?($repository)
5      usage("no such directory: #{$repository.inspect}")
6    end
7 -  $repository =~ /([^\/]+$)/ 
8 -  $shortrepo = $1
9  end
10  
11  # runs the given svnlook subcommand
12 @@ -173,7 +171,7 @@
13    prev_rev= $revision-1
14    next_rev= $revision
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"
20  end
21 @@ -187,7 +185,7 @@
22    next_rev = m[1].to_i
23    diff2 = lines.current
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 =~ /^[-\+ @\\]/
30 @@ -208,7 +206,7 @@
31  def process_added_binary_diff(out, lines, path)
32    next_rev= $revision
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"
38  end
39 @@ -221,7 +219,7 @@
40    next_rev = m[1].to_i
41    diff2 = lines.current
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 =~ /^[-\+ @\\]/
48 @@ -238,7 +236,7 @@
49    next_rev = m[1].to_i
50    diff2 = 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 =~ /^[-\+ @\\]/
57 @@ -287,7 +285,7 @@
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
64    out.puts "#U "
65    out.puts "#U Property changes:"
66 @@ -316,8 +314,8 @@
67  def handle_copy(out, lines, path, from_ref, from_file)
68    prev_rev= $revision-1
69    next_rev= $revision
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+)\)$/)
76      prev_rev = m[1].to_i
77 @@ -332,7 +330,7 @@
78      end
79    else
80      out.puts "#U "
81 -    out.puts "#U Copied from #{$shortrepo}/#{from_file}:#{from_ref}"
82 +    out.puts "#U Copied from #{from_file}:#{from_ref}"
83      out.puts "#U "
84    end
85  end
This page took 0.061795 seconds and 3 git commands to generate.