Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/buildbot/buildbot/test/mail/syncmail.4
blob: 44bda5df2abd5480d45ee89bd93f50055d4a78fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
Return-Path: <warner@users.sourceforge.net>
Delivered-To: warner-sourceforge@luther.lothar.com
Received: (qmail 24111 invoked by uid 1000); 28 Jul 2003 08:01:54 -0000
Delivered-To: warner-sourceforge@lothar.com
Received: (qmail 68756 invoked by uid 13574); 28 Jul 2003 08:01:46 -0000
Received: from unknown (HELO sc8-sf-list1.sourceforge.net) ([66.35.250.206]) (envelope-sender <warner@users.sourceforge.net>)
          by 130.94.181.6 (qmail-ldap-1.03) with SMTP
          for <warner-sourceforge@lothar.com>; 28 Jul 2003 08:01:46 -0000
Received: from sc8-sf-sshgate.sourceforge.net ([66.35.250.220] helo=sc8-sf-netmisc.sourceforge.net)
	by sc8-sf-list1.sourceforge.net with esmtp 
	(Cipher TLSv1:DES-CBC3-SHA:168) (Exim 3.31-VA-mm2 #1 (Debian))
	id 19h2wz-00029d-00
	for <warner@users.sourceforge.net>; Mon, 28 Jul 2003 01:01:45 -0700
Received: from sc8-pr-cvs1-b.sourceforge.net ([10.5.1.7] helo=sc8-pr-cvs1.sourceforge.net)
	by sc8-sf-netmisc.sourceforge.net with esmtp (Exim 3.36 #1 (Debian))
	id 19h2wz-0002XB-00
	for <warner@users.sourceforge.net>; Mon, 28 Jul 2003 01:01:45 -0700
Received: from localhost ([127.0.0.1] helo=sc8-pr-cvs1.sourceforge.net)
	by sc8-pr-cvs1.sourceforge.net with esmtp (Exim 3.22 #1 (Debian))
	id 19h2wz-0005a9-00
	for <warner@users.sourceforge.net>; Mon, 28 Jul 2003 01:01:45 -0700
From: warner@users.sourceforge.net
To: warner@users.sourceforge.net
Subject: buildbot/test/mail syncmail.1,NONE,1.1 syncmail.2,NONE,1.1 syncmail.3,NONE,1.1
Message-Id: <E19h2wz-0005a9-00@sc8-pr-cvs1.sourceforge.net>
Date: Mon, 28 Jul 2003 01:01:45 -0700
Status:   

Update of /cvsroot/buildbot/buildbot/test/mail
In directory sc8-pr-cvs1:/tmp/cvs-serv21445

Added Files:
	syncmail.1 syncmail.2 syncmail.3 
Log Message:
test cases for syncmail parser

--- NEW FILE: syncmail.1 ---
Return-Path: <warner@users.sourceforge.net>
Delivered-To: warner-sourceforge@luther.lothar.com
Received: (qmail 23758 invoked by uid 1000); 28 Jul 2003 07:22:14 -0000
Delivered-To: warner-sourceforge@lothar.com
Received: (qmail 62715 invoked by uid 13574); 28 Jul 2003 07:22:03 -0000
Received: from unknown (HELO sc8-sf-list1.sourceforge.net) ([66.35.250.206]) (envelope-sender <warner@users.sourceforge.net>)
          by 130.94.181.6 (qmail-ldap-1.03) with SMTP
          for <warner-sourceforge@lothar.com>; 28 Jul 2003 07:22:03 -0000
Received: from sc8-sf-sshgate.sourceforge.net ([66.35.250.220] helo=sc8-sf-netmisc.sourceforge.net)
	by sc8-sf-list1.sourceforge.net with esmtp 
	(Cipher TLSv1:DES-CBC3-SHA:168) (Exim 3.31-VA-mm2 #1 (Debian))
	id 19h2KY-0004Nr-00
	for <warner@users.sourceforge.net>; Mon, 28 Jul 2003 00:22:02 -0700
Received: from sc8-pr-cvs1-b.sourceforge.net ([10.5.1.7] helo=sc8-pr-cvs1.sourceforge.net)
	by sc8-sf-netmisc.sourceforge.net with esmtp (Exim 3.36 #1 (Debian))
	id 19h2KY-0001rv-00
	for <warner@users.sourceforge.net>; Mon, 28 Jul 2003 00:22:02 -0700
Received: from localhost ([127.0.0.1] helo=sc8-pr-cvs1.sourceforge.net)
	by sc8-pr-cvs1.sourceforge.net with esmtp (Exim 3.22 #1 (Debian))
	id 19h2KY-0003r4-00
	for <warner@users.sourceforge.net>; Mon, 28 Jul 2003 00:22:02 -0700
From: warner@users.sourceforge.net
To: warner@users.sourceforge.net
Subject: buildbot/buildbot/changes freshcvsmail.py,1.2,1.3
Message-Id: <E19h2KY-0003r4-00@sc8-pr-cvs1.sourceforge.net>
Date: Mon, 28 Jul 2003 00:22:02 -0700
Status:   

Update of /cvsroot/buildbot/buildbot/buildbot/changes
In directory sc8-pr-cvs1:/tmp/cvs-serv14795/buildbot/changes

Modified Files:
	freshcvsmail.py 
Log Message:
remove leftover code, leave a temporary compatibility import. Note! Start
importing FCMaildirSource from changes.mail instead of changes.freshcvsmail


Index: freshcvsmail.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/freshcvsmail.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** freshcvsmail.py	27 Jul 2003 18:54:08 -0000	1.2
--- freshcvsmail.py	28 Jul 2003 07:22:00 -0000	1.3
***************
*** 1,96 ****
  #! /usr/bin/python
  
! from buildbot.interfaces import IChangeSource
! from buildbot.changes.maildirtwisted import MaildirTwisted
! from buildbot.changes.changes import Change
! from rfc822 import Message
! import os, os.path
! 
! def parseFreshCVSMail(fd, prefix=None):
!     """Parse mail sent by FreshCVS"""
!     # this uses rfc822.Message so it can run under python2.1 . In the future
!     # it will be updated to use python2.2's "email" module.
! 
!     m = Message(fd)
!     # FreshCVS sets From: to "user CVS <user>", but the <> part may be
!     # modified by the MTA (to include a local domain)
!     name, addr = m.getaddr("from")
!     if not name:
!         return None # no From means this message isn't from FreshCVS
!     cvs = name.find(" CVS")
!     if cvs == -1:
!         return None # this message isn't from FreshCVS
!     who = name[:cvs]
! 
!     # we take the time of receipt as the time of checkin. Not correct,
!     # but it avoids the out-of-order-changes issue
!     #when = m.getdate() # and convert from 9-tuple, and handle timezone
! 
!     files = []
!     comments = ""
!     isdir = 0
!     lines = m.fp.readlines()
!     while lines:
!         line = lines.pop(0)
!         if line == "Modified files:\n":
!             break
!     while lines:
!         line = lines.pop(0)
!         if line == "\n":
!             break
!         line = line.rstrip("\n")
!         file, junk = line.split(None, 1)
!         if prefix:
!             # insist that the file start with the prefix: FreshCVS sends
!             # changes we don't care about too
!             bits = file.split(os.sep)
!             if bits[0] == prefix:
!                 file = apply(os.path.join, bits[1:])
!             else:
!                 break
!         if junk == "0 0":
!             isdir = 1
!         files.append(file)
!     while lines:
!         line = lines.pop(0)
!         if line == "Log message:\n":
!             break
!     # message is terminated by "ViewCVS links:" or "Index:..." (patch)
!     while lines:
!         line = lines.pop(0)
!         if line == "ViewCVS links:\n":
!             break
!         if line.find("Index: ") == 0:
!             break
!         comments += line
!     comments = comments.rstrip() + "\n"
! 
!     if not files:
!         return None
!     
!     change = Change(who, files, comments, isdir)
! 
!     return change
!     
!         
!         
! class FCMaildirSource(MaildirTwisted):
!     """This source will watch a maildir that is subscribed to a FreshCVS
!     change-announcement mailing list.
!     """
! 
!     __implements__ = IChangeSource,
  
!     def __init__(self, maildir, prefix=None):
!         MaildirTwisted.__init__(self, maildir)
!         self.changemaster = None # filled in when added
!         self.prefix = prefix
!     def describe(self):
!         return "FreshCVS mailing list in maildir %s" % self.maildir.where
!     def messageReceived(self, filename):
!         path = os.path.join(self.basedir, "new", filename)
!         change = parseFreshCVSMail(open(path, "r"), self.prefix)
!         if change:
!             self.changemaster.addChange(change)
!         os.rename(os.path.join(self.basedir, "new", filename),
!                   os.path.join(self.basedir, "cur", filename))
--- 1,5 ----
  #! /usr/bin/python
  
! # leftover import for compatibility
  
! from buildbot.changes.mail import FCMaildirSource



--- NEW FILE: syncmail.2 ---
Return-Path: <warner@users.sourceforge.net>
Delivered-To: warner-sourceforge@luther.lothar.com
Received: (qmail 23221 invoked by uid 1000); 28 Jul 2003 06:53:15 -0000
Delivered-To: warner-sourceforge@lothar.com
Received: (qmail 58537 invoked by uid 13574); 28 Jul 2003 06:53:09 -0000
Received: from unknown (HELO sc8-sf-list1.sourceforge.net) ([66.35.250.206]) (envelope-sender <warner@users.sourceforge.net>)
          by 130.94.181.6 (qmail-ldap-1.03) with SMTP
          for <warner-sourceforge@lothar.com>; 28 Jul 2003 06:53:09 -0000
Received: from sc8-sf-sshgate.sourceforge.net ([66.35.250.220] helo=sc8-sf-netmisc.sourceforge.net)
	by sc8-sf-list1.sourceforge.net with esmtp 
	(Cipher TLSv1:DES-CBC3-SHA:168) (Exim 3.31-VA-mm2 #1 (Debian))
	id 19h1sb-0003nw-00
	for <warner@users.sourceforge.net>; Sun, 27 Jul 2003 23:53:09 -0700
Received: from sc8-pr-cvs1-b.sourceforge.net ([10.5.1.7] helo=sc8-pr-cvs1.sourceforge.net)
	by sc8-sf-netmisc.sourceforge.net with esmtp (Exim 3.36 #1 (Debian))
	id 19h1sa-00018t-00
	for <warner@users.sourceforge.net>; Sun, 27 Jul 2003 23:53:08 -0700
Received: from localhost ([127.0.0.1] helo=sc8-pr-cvs1.sourceforge.net)
	by sc8-pr-cvs1.sourceforge.net with esmtp (Exim 3.22 #1 (Debian))
	id 19h1sa-0002mX-00
	for <warner@users.sourceforge.net>; Sun, 27 Jul 2003 23:53:08 -0700
From: warner@users.sourceforge.net
To: warner@users.sourceforge.net
Subject: buildbot ChangeLog,1.93,1.94
Message-Id: <E19h1sa-0002mX-00@sc8-pr-cvs1.sourceforge.net>
Date: Sun, 27 Jul 2003 23:53:08 -0700
Status:   

Update of /cvsroot/buildbot/buildbot
In directory sc8-pr-cvs1:/tmp/cvs-serv10689

Modified Files:
	ChangeLog 
Log Message:
	* NEWS: started adding new features


Index: ChangeLog
===================================================================
RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v
retrieving revision 1.93
retrieving revision 1.94
diff -C2 -d -r1.93 -r1.94
*** ChangeLog	27 Jul 2003 22:53:27 -0000	1.93
--- ChangeLog	28 Jul 2003 06:53:06 -0000	1.94
***************
*** 1,4 ****
--- 1,6 ----
  2003-07-27  Brian Warner  <warner@lothar.com>
  
+ 	* NEWS: started adding new features
+ 
  	* buildbot/changes/mail.py: start work on Syncmail parser, move
  	mail sources into their own file



--- NEW FILE: syncmail.3 ---
Return-Path: <warner@users.sourceforge.net>
Delivered-To: warner-sourceforge@luther.lothar.com
Received: (qmail 23196 invoked by uid 1000); 28 Jul 2003 06:51:53 -0000
Delivered-To: warner-sourceforge@lothar.com
Received: (qmail 58269 invoked by uid 13574); 28 Jul 2003 06:51:46 -0000
Received: from unknown (HELO sc8-sf-list1.sourceforge.net) ([66.35.250.206]) (envelope-sender <warner@users.sourceforge.net>)
          by 130.94.181.6 (qmail-ldap-1.03) with SMTP
          for <warner-sourceforge@lothar.com>; 28 Jul 2003 06:51:46 -0000
Received: from sc8-sf-sshgate.sourceforge.net ([66.35.250.220] helo=sc8-sf-netmisc.sourceforge.net)
	by sc8-sf-list1.sourceforge.net with esmtp 
	(Cipher TLSv1:DES-CBC3-SHA:168) (Exim 3.31-VA-mm2 #1 (Debian))
	id 19h1rF-00027s-00
	for <warner@users.sourceforge.net>; Sun, 27 Jul 2003 23:51:46 -0700
Received: from sc8-pr-cvs1-b.sourceforge.net ([10.5.1.7] helo=sc8-pr-cvs1.sourceforge.net)
	by sc8-sf-netmisc.sourceforge.net with esmtp (Exim 3.36 #1 (Debian))
	id 19h1rF-00017O-00
	for <warner@users.sourceforge.net>; Sun, 27 Jul 2003 23:51:45 -0700
Received: from localhost ([127.0.0.1] helo=sc8-pr-cvs1.sourceforge.net)
	by sc8-pr-cvs1.sourceforge.net with esmtp (Exim 3.22 #1 (Debian))
	id 19h1rF-0002jg-00
	for <warner@users.sourceforge.net>; Sun, 27 Jul 2003 23:51:45 -0700
From: warner@users.sourceforge.net
To: warner@users.sourceforge.net
Subject: CVSROOT syncmail,1.1,NONE
Message-Id: <E19h1rF-0002jg-00@sc8-pr-cvs1.sourceforge.net>
Date: Sun, 27 Jul 2003 23:51:45 -0700
Status:   

Update of /cvsroot/buildbot/CVSROOT
In directory sc8-pr-cvs1:/tmp/cvs-serv10515

Removed Files:
	syncmail 
Log Message:
nevermind

--- syncmail DELETED ---