jhbuild r2263 - in trunk: . jhbuild/buildbot
- From: fpeters svn gnome org
- To: svn-commits-list gnome org
- Subject: jhbuild r2263 - in trunk: . jhbuild/buildbot
- Date: Sat, 16 Aug 2008 15:57:18 +0000 (UTC)
Author: fpeters
Date: Sat Aug 16 15:57:17 2008
New Revision: 2263
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2263&view=rev
Log:
* jhbuild/buildbot/changes.py: added support for the
content-transfer-encoding header as it is used in some emails; also fixed
discovery of last line in translator messages.
Modified:
trunk/ChangeLog
trunk/jhbuild/buildbot/changes.py
Modified: trunk/jhbuild/buildbot/changes.py
==============================================================================
--- trunk/jhbuild/buildbot/changes.py (original)
+++ trunk/jhbuild/buildbot/changes.py Sat Aug 16 15:57:17 2008
@@ -24,6 +24,8 @@
from email.Utils import parseaddr
from email.Iterators import body_line_iterator
+import base64
+
class GnomeMaildirSource(MaildirSource):
name = "Gnome svn-commits-list"
@@ -48,25 +50,27 @@
files = []
comments = ""
isdir = 0
- lines = list(body_line_iterator(m))
+ lines = list(body_line_iterator(m, m['Content-Transfer-Encoding']))
changeType = ''
links = []
while lines:
line = lines.pop(0)
- if line[:14] == "New Revision: ":
- revision = line[14:-1]
+ if line.startswith('New Revision: '):
+ revision = line.split(':', 1)[1].strip()
- if line[:5] == "URL: ":
- links.append(line[5:-1])
+ if line.startswith('URL: '):
+ links.append(line.split(':', 1)[1].strip())
- if line[:-1] == "Log:":
- while not (lines[0].startswith("Added:") or lines[0].startswith("Modified:") or lines[0].startswith("Removed:")):
+ if line[:-1] == 'Log:':
+ while not (lines[0].startswith('Added:') or
+ lines[0].startswith('Modified:') or
+ lines[0].startswith('Removed:')):
comments += lines.pop(0)
comments = comments.rstrip()
if line[:-1] in ("Added:", "Modified:", "Removed:"):
- while not (lines[0] == "\n"):
+ while not (lines[0] == "\n" or lines[0].startswith('______')):
l = lines.pop(0)
if l[:-1] not in ("Added:", "Modified:", "Removed:"):
files.append(l[3:-1])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]