root/trunk/nightly_build/convert_to_links.pl @ 210

Revision 210, 500 bytes (checked in by melo, 5 years ago)

Link 'Rev. ID:' to the proper changeset page

Signed-off-by: Pedro Melo < melo@simplicidade.org>

  • Property svn:executable set to *
Line 
1#!/usr/bin/perl -w
2#
3# Convert patterns of ticket and revision references to links
4#
5
6use strict;
7
8my $trac_base_url = 'http://trac.softwarelivre.sapo.pt/sapo_msg_mac';
9
10while (my $l = <>) {
11  # Match Rev. ID: and switch to changeset link
12  $l =~ s{
13    Rev[.]\s+
14    (\d+)
15    :
16  }
17  {Rev. <a href="$trac_base_url/changeset/$1">$1</a>:}gx;
18 
19  # Match #TICKET and switch to ticket link
20  $l =~ s{
21    (
22      \#
23      (\d+)
24    )
25  }{<a href="$trac_base_url/ticket/$2">$1</a>}gx;
26 
27  print $l;
28}
Note: See TracBrowser for help on using the browser.