BlogrollDie Großen Freunde und Bekannte Interesting Reads Auf ein Wort"»Nun ja, Männer erjagen das Essen (zum Beispiel im Supermarkt), Frauen bereiten es zu. Scheint wohl ein gottgegebenes Prinzip zu sein. Ist auch besser für die Gesundheit.«"
Top Exitsth-h.de (147)
www.nerdtests.com (102) www.gaeubote.de (35) al.howardknight.net (29) de.wikipedia.org (25) groups.google.com (21) www.cccs.de (18) www.debian.org (16) git.madduck.net (15) news.szaf.org (15) CounterBlog Administration |
Saturday, May 15. 2010Mantis: Git-Integration - ein steiniger WegTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Ich konnte das Plugin zum laufen bekommen indem ich in der Datei “SourceGitweb.php” des Plugins um und bei Zeile 279 den Regex im preg_match aufruf durch Folgendes ersetzte: #<tr><td>author</td><td>(?:<a[^>]*>)?([^<>]*)(?:</a>)? <strong>(?:<a[^>]*>)?<([^<>]*)>(?:</a>)?</td>(?:<[^<>]*>\s*)</strong>?</tr><tr><td></td><td> \w*, (\d* \w* \d* \d*:\d*:\d*)([^<>]*)</td># Da sich der Quellcode der Gitweb Seite offensichtlich verändert hat. Viele Grüße an den, der das hier noch ließt und dem damit geholfen wird Felix Mein Patch gegen den (jetzt nicht mehr) aktuellen Master-Branch im alten Repo auf http://git.mantisforge.org/w/source-integration.git sah so aus: CODE: From b5a0da200c60c67fd8cf6599b6f783de74d6c71a Mon Sep 17 00:00:00 2001
From: Thomas Hochstein <thh@inter.net>
Date: Tue, 30 Oct 2012 21:26:55 +0100
Subject: [PATCH] Fix parsing of Gitweb commit data.
The SourceGitweb plugin does not parse commit data
correctly for Gitweb 1.7.2.5 with avatar support.
Some changes to the regular expressions are needed.
See bug 85:
http://leetcode.net/mantis/view85.html#c240
Signed-off-by: Thomas Hochstein <thh@inter.net>
---
SourceGitweb/SourceGitweb.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/SourceGitweb/SourceGitweb.php b/SourceGitweb/SourceGitweb.php
index 635f75b..325e4a8 100644
--- a/SourceGitweb/SourceGitweb.php
+++ b/SourceGitweb/SourceGitweb.php
@@ -247,13 +247,15 @@ class SourceGitwebPlugin extends MantisSourcePlugin {
if ( !SourceChangeset::exists( $p_repo->id, $t_commit[’revision’] ) ) {
# Parse for commit data
- preg_match( ’#<tr><td>author</td><td>([^<>]*) <([^<>]*)></td></tr>’.
+ #preg_match( ’#<tr><td>author</td><td>([^<>]*) <([^<>]*)></td></tr>’.
+ preg_match( ’#<tr><td>author</td><td>(?:<a[^>]*>)?([^<>]*)(?:</a>)? <strong>(?:<a[^>]*>)?<([^<>]*)>(?:</a>)?</td>(?:<[^<>]*>\s*)</strong>?</tr>’.
’<tr><td></td><td> \w*, (\d* \w* \d* \d*:\d*:\d*)#’, $t_gitweb_data, $t_matches );
$t_commit[’author’] = $t_matches[1];
$t_commit[’author_email’] = $t_matches[2];
$t_commit[’date’] = date( ’Y-m-d H:i:s’, strtotime( $t_matches[3] ) );
- if( preg_match( ’#<tr><td>committer</td><td>([^<>]*) <([^<>]*)></td></tr>#’, $t_gitweb_data, $t_matches ) ) {
+ #if( preg_match( ’#<tr><td>committer</td><td>([^<>]*) <([^<>]*)></td></tr>#’, $t_gitweb_data, $t_matches ) ) {
+ if( preg_match( ’#<tr><td>author</td><td>(?:<a[^>]*>)?([^<>]*)(?:</a>)? <strong>(?:<a[^>]*>)?<([^<>]*)>(?:</a>)?</td>(?:<[^<>]*>\s*)</strong>?</tr>#’, $t_gitweb_data, $t_matches ) ) {
$t_commit[’committer’] = $t_matches[1];
$t_commit[’committer_email’] = $t_matches[2];
}
--
1.7.2.5 Der neue Master-Branch auf Github https://github.com/mantisbt-plugins/source-integration scheint den Code im wesentlichen eingebaut zu haben. |
CalendarArchivesQuicksearchKategorienGetaggte Artikel AND anleitung arztrecht bawue.net berlin BGH bverfg CCCS checkmail de-regio debian dhcp dns dovecot drk E-Mail exim fd git htc desire INN internetrecht JUH Lenny LG S linux Mailman mantis Munin olg hamburg olg hamm olg ka PHP rechtsprechung SAGE spam squeeze strafrecht twitter Usenet verkehrsrecht Vortrag windows ww yapfaqKommentareMon, 03.12.2012 16:23
Tue, 30.10.2012 21:48
Sat, 27.10.2012 09:31
Fri, 26.10.2012 15:46
Mon, 15.10.2012 18:42
Sun, 16.09.2012 02:13
Tue, 07.08.2012 08:09
Mon, 06.08.2012 18:54
Sat, 02.06.2012 01:13
|