1 --- /tmp/process_cvs_commits.php 2005-01-17 20:51:29.343450373 +0200
2 +++ ./misc/scm/process_cvs_commits.php 2005-01-17 20:51:10.639892676 +0200
4 if (count($matches) > 1) {
5 $issue_id = $matches[1];
6 $commit_msg = base64_encode($commit_msg);
7 + $cvs_module = base64_encode($cvs_module);
8 + $username = base64_encode($username);
9 + $issue_id = base64_encode($issue_id);
11 // build the GET url to use
12 $ping_url = $eventum_relative_url . "scm_ping.php?module=$cvs_module&username=$username&commit_msg=$commit_msg";
13 $ping_url .= "&issue[]=$issue_id";
14 for ($i = 0; $i < count($modified_files); $i++) {
15 - $ping_url .= "&files[$i]=" . $modified_files[$i]['filename'];
16 - $ping_url .= "&old_versions[$i]=" . $modified_files[$i]['old_revision'];
17 - $ping_url .= "&new_versions[$i]=" . $modified_files[$i]['new_revision'];
18 + $ping_url .= "&files[$i]=" . base64_encode($modified_files[$i]['filename']);
19 + $ping_url .= "&old_versions[$i]=" . base64_encode($modified_files[$i]['old_revision']);
20 + $ping_url .= "&new_versions[$i]=" . base64_encode($modified_files[$i]['new_revision']);
23 $fp = fsockopen($eventum_domain, $eventum_port, $errno, $errstr, 30);
27 from http://lists.mysql.com/eventum-devel/141
28 2. Then the regular expression to match cvs commit messages on issue
29 numbers doesn't work. It will accept almost anything with a number in
32 --- eventum-1.4/misc/scm/process_cvs_commits.php~ 2005-02-07 16:24:57.000000000 +0200
33 +++ eventum-1.4/misc/scm/process_cvs_commits.php 2005-02-07 16:27:03.000000000 +0200
35 $commit_msg = substr($input, strpos($input, 'Log Message:')+strlen('Log Message:')+1);
37 // parse the commit message and get the first issue number we can find
38 -$pattern = "/[issue|bug] ?:? ?#?(\d+)/i";
39 +$pattern = "/(?:issue|bug) ?:? ?#?(\d+)/i";
40 preg_match($pattern, $commit_msg, $matches);
42 if (count($matches) > 1) {