#
# Patch for Bugzilla to enable the magic identifiers in bug comments.
#

--- bugzilla-2.20-orig/globals.pl
+++ bugzilla-2.20/globals.pl
@@ -801,6 +801,18 @@
 
     $text = html_quote($text);
 
+    # BugID:
+    $text =~ s~\b(BugID:)\s?(\d+)\b
+              ~$1 . " " . GetBugLink($2,$2)~egox;
+
+    # VCS:
+    $text =~ s~\b(VCS:)\s?([0-9A-Za-z_/\-.]*)\b
+              ~$1 <a href=\"/cgi-bin/viewcvs.cgi/$2\">$2</a>~igx;
+
+    # Wiki:
+    $text =~ s~\b(Wiki:)\s?([A-Za-z_\-:]*)\b
+              ~$1 <a href=\"/wiki/index.php/$2\">$2</a>~igx;
+
     # mailto:
     # Use |<nothing> so that $1 is defined regardless
     $text =~ s~\b(mailto:|)?([\w\.\-\+\=]+\@[\w\-]+(?:\.[\w\-]+)+)\b

