630cba87cdd5305aa3da3426e0a9f260cf3ccebf
[code.git] / debian / bugzilla / svn / Template.pm.diff
1 --- Template.pm.orig    2008-04-15 12:13:24.000000000 -0700
2 +++ Template.pm 2008-04-15 15:00:20.000000000 -0700
3 @@ -353,6 +353,30 @@
4                 (?=\ \*\*\*\Z)
5                ~get_bug_link($1, $1)
6                ~egmx;
7 +       
8 +    # Commander: match SCMBUG comments
9 +    # based off of http://bugzilla.mkgnu.net/attachment.cgi?id=197&action=diff
10 +    $text =~ s~(?<=^)          (?#    The beginning of the line              )
11 +               (\d+|NONE)      (?# 1  The previous revision                  )       
12 +               (\s*--&gt;\s*)  (?# 2  The arrow and spaces before/after      )
13 +               (\d+|NONE)      (?# 3  The current revision                   )
14 +               (\s*)           (?# 4  The space immediately after            )
15 +               (               (?# 5  The entire file/directory name         )
16 +                 (             (?# 6  The project prefix [optional]          )
17 +                   ([\w\.]+)   (?# 7  Just the project name itself           )
18 +                   \:
19 +                 )?   
20 +                 (             (?# 8  The file/directory name                )
21 +                   [\w\.\/-]*
22 +                 )
23 +               )
24 +               (?=$)              (?# The end of the line              )
25 +              ~ "$1$2$3$4<a href=\"https://viewsvn/changeset/"
26 +               . (($3 ne "NONE") # If there is a new revision
27 +                    ? "$3" # show the new revision
28 +                    : $1+1) # else there better be an old revision which we can add one to
29 +               . "\">$8</a>"
30 +              ~egmx;
31  
32      # Now remove the encoding hacks
33      $text =~ s/\0\0(\d+)\0\0/$things[$1]/eg;