⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syncmail.1

📁 The BuildBot is a system to automate the compile/test cycle required by most software projects. CVS
💻 1
字号:
Return-Path: <warner@users.sourceforge.net>Delivered-To: warner-sourceforge@luther.lothar.comReceived: (qmail 23758 invoked by uid 1000); 28 Jul 2003 07:22:14 -0000Delivered-To: warner-sourceforge@lothar.comReceived: (qmail 62715 invoked by uid 13574); 28 Jul 2003 07:22:03 -0000Received: 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 -0000Received: 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 -0700Received: 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 -0700Received: 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 -0700From: warner@users.sourceforge.netTo: warner@users.sourceforge.netSubject: buildbot/buildbot/changes freshcvsmail.py,1.2,1.3Message-Id: <E19h2KY-0003r4-00@sc8-pr-cvs1.sourceforge.net>Date: Mon, 28 Jul 2003 00:22:02 -0700Status:   Update of /cvsroot/buildbot/buildbot/buildbot/changesIn directory sc8-pr-cvs1:/tmp/cvs-serv14795/buildbot/changesModified Files:	freshcvsmail.py Log Message:remove leftover code, leave a temporary compatibility import. Note! Startimporting FCMaildirSource from changes.mail instead of changes.freshcvsmailIndex: freshcvsmail.py===================================================================RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/freshcvsmail.py,vretrieving revision 1.2retrieving revision 1.3diff -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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -