]> git.pld-linux.org Git - packages/eventum.git/blame - eventum-scm-updates.patch
- small cli error check
[packages/eventum.git] / eventum-scm-updates.patch
CommitLineData
e05be4bc
ER
1--- eventum-20060324/misc/scm/process_cvs_commits.php 2006-03-28 12:21:12.000000000 +0300
2+++ /home/glen/scm 2006-03-28 12:24:01.000000000 +0300
3@@ -66,19 +67,21 @@
4 $commit_msg = substr($input, strpos($input, 'Log Message:')+strlen('Log Message:')+1);
5
6 // parse the commit message and get the first issue number we can find
7-$pattern = "/(?:issue|bug) ?:? ?#?(\d+)/i";
8-preg_match($pattern, $commit_msg, $matches);
9+$pattern = "/(?:issue|bug|close[ds]?|fix(?:e[ds])?) ?:? ?#?(\d+)/i";
10+preg_match_all($pattern, $commit_msg, $matches);
11
12 if (count($matches) > 1) {
13 // need to encode all of the url arguments
14- $issue_id = rawurlencode($matches[1]);
15 $commit_msg = rawurlencode($commit_msg);
16 $cvs_module = rawurlencode($cvs_module);
17 $username = rawurlencode($username);
18
19 // build the GET url to use
20 $ping_url = $eventum_relative_url . "scm_ping.php?module=$cvs_module&username=$username&commit_msg=$commit_msg";
21- $ping_url .= "&issue[]=$issue_id";
22+ foreach ($matches[1] as $issue_id) {
23+ $ping_url .= "&issue[]=$issue_id";
24+ }
25+
26 for ($i = 0; $i < count($modified_files); $i++) {
27 $ping_url .= "&files[$i]=" . rawurlencode($modified_files[$i]['filename']);
28 $ping_url .= "&old_versions[$i]=" . rawurlencode($modified_files[$i]['old_revision']);
This page took 0.037804 seconds and 4 git commands to generate.