summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3c87100)
raw | patch | inline | side by side (parent: 3c87100)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 5 Nov 2002 22:59:46 +0000 (22:59 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 5 Nov 2002 22:59:46 +0000 (22:59 +0000) |
- copied email address quoting from email v2.4.3 so we're consistent with 2.2
- email summary extraction now takes the first whole sentence or line -
whichever is longer
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1373 57a73879-2fb5-44c3-a270-3262357dd7e2
- email summary extraction now takes the first whole sentence or line -
whichever is longer
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1373 57a73879-2fb5-44c3-a270-3262357dd7e2
diff --git a/CHANGES.txt b/CHANGES.txt
index 4c9d42c33cbe328f0686e1c9aadcc103f545a57c..2d29c38134c4db353c911cad39ddfbed272b3c15 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
- force non-word boundary to match re: in subject (sf bug 626303)
- handle sqlite bug (<2.7.2) (sf bug 630828)
- handle missing props in anydbm stringFind
+- updated email package address formatting (deprecation)
+- copied email address quoting from email v2.4.3 so we're consistent with 2.2
+- email summary extraction now takes the first whole sentence or line -
+ whichever is longer
2002-10-16 0.5.1
diff --git a/TODO.txt b/TODO.txt
index dbe7c133aa9050b55eafa7fac38284c7e09cecec..e37e0a63c20afa17b6592e6b0fd77e1b9b4a490e 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
comparison functions: lt, le, eq, ge, gt. eq and
[value, value, ...] implies "in"
pending hyperdb migrate "id" property to be Number type
+pending hyperdb multilink sorting by length is dumb
pending tracker split instance.open() into open() and login()
pending mailgw allow commands (feature request #556996)
like "help", "dump issue123" (would send all info about
pending web column-heading sort stuff isn't implemented
active web UNIX init.d script for roundup-server
-bug docs need to mention somewhere how sorting works
- - it's mentioned in the design doc
- - multilink sorting by length is dumb
bug web query editing isn't fully implemented
bug web no testing for parsePropsFromForm
+active web revert to showing entire message in classic issue display
======= ========= =============================================================
diff --git a/doc/customizing.txt b/doc/customizing.txt
index b75388b842de0b6019dfd032dcf741fa254b797d..60ec72115ee1308d2091910cc0c50619ef19093b 100644 (file)
--- a/doc/customizing.txt
+++ b/doc/customizing.txt
Customising Roundup
===================
-:Version: $Revision: 1.60 $
+:Version: $Revision: 1.61 $
.. This document borrows from the ZopeBook section on ZPT. The original is at:
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
Using a UN*X passwd file as the user database
---------------------------------------------
-On some systems, the primary store of users is the UN*X passwd file. It holds
+On some systems the primary store of users is the UN*X passwd file. It holds
information on users such as their username, real name, password and primary
user group.
@@ -2600,9 +2600,11 @@ day, or several times an hour if more immediate access is needed. In short, it:
1. parses the passwd file, finding usernames, passwords and real names,
2. compares that list to the current roundup user list:
+
a. entries no longer in the passwd file are *retired*
b. entries with mismatching real names are *updated*
c. entries only exist in the passwd file are *created*
+
3. send an email to administrators to let them know what's been done.
The retiring and updating are simple operations, requiring only a call to
diff --git a/doc/index.txt b/doc/index.txt
index 7973569ff7b62f89a7fad4453077cde6438c8d95..731d58e873b31ac7772f30f8a0144167eab7c64f 100644 (file)
--- a/doc/index.txt
+++ b/doc/index.txt
Anthony Baxter,
Jeff Blaine,
Duncan Booth,
+Seb Brezel,
Titus Brown,
Roch'e Compaan,
Engelbert Gruber,
Detlef Lannert,
Gordon McMillan,
Patrick Ohly,
+Will Partain,
Bernhard Reiter,
Dougal Scott,
Stefan Seefeld,
diff --git a/roundup/mailgw.py b/roundup/mailgw.py
index 3aa50b9afdfec1b7ea01775de637494bb4e55c4c..8b4f95e6de567160cee5a5f0b85788fb3f455a9e 100644 (file)
--- a/roundup/mailgw.py
+++ b/roundup/mailgw.py
an exception, the original message is bounced back to the sender with the
explanatory message given in the exception.
-$Id: mailgw.py,v 1.98 2002-10-21 22:03:09 richard Exp $
+$Id: mailgw.py,v 1.99 2002-11-05 22:59:46 richard Exp $
'''
import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
l.append(section)
continue
# keep this section - it has reponse stuff in it
- if not summary:
- # and while we're at it, use the first non-quoted bit as
- # our summary
- summary = line
lines = lines[lines.index(line):]
section = '\n'.join(lines)
+ # and while we're at it, use the first non-quoted bit as
+ # our summary
+ summary = section
if not summary:
# if we don't have our summary yet use the first line of this
# section
- summary = lines[0]
+ summary = section
elif signature.match(lines[0]) and 2 <= len(lines) <= 10:
# lose any signature
break
# and add the section to the output
l.append(section)
+ # figure the summary - find the first sentence-ending punctuation or the
+ # first whole line, whichever is longest
+ sentence = re.search(r'^([^!?\.]+[!?\.])', summary)
+ if sentence:
+ sentence = sentence.group(1)
+ else:
+ sentence = ''
+ first = eol.split(summary)[0]
+ summary = max(sentence, first)
+
# Now reconstitute the message content minus the bits we don't care
# about.
if not keep_body:
diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py
index e94632babe073edde0046aa9bf6a94a0720560d7..8fd9b287bf552ad1920678dca470a16adfc62d94 100644 (file)
--- a/roundup/roundupdb.py
+++ b/roundup/roundupdb.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: roundupdb.py,v 1.72 2002-10-08 07:28:34 richard Exp $
+# $Id: roundupdb.py,v 1.73 2002-11-05 22:59:46 richard Exp $
__doc__ = """
Extending hyperdb with types specific to issue-tracking.
import base64, quopri, mimetypes
# if available, use the 'email' module, otherwise fallback to 'rfc822'
try :
- from email.Utils import dump_address_pair as straddr
+ from email.Utils import formataddr as straddr
except ImportError :
- from rfc822 import dump_address_pair as straddr
+ # code taken from the email package 2.4.3
+ def straddr(pair, specialsre = re.compile(r'[][\()<>@,:;".]'),
+ escapesre = re.compile(r'[][\()"]')):
+ name, address = pair
+ if name:
+ quotes = ''
+ if specialsre.search(name):
+ quotes = '"'
+ name = escapesre.sub(r'\\\g<0>', name)
+ return '%s%s%s <%s>' % (quotes, name, quotes, address)
+ return address
import hyperdb
index 4f4b213f65dc52a7f21ad96a51c7a0e9bbc9fced..aa0975529838ed2b4476efbd276735335adf55a8 100644 (file)
#
""" HTTP Server that serves roundup.
-$Id: roundup_server.py,v 1.14 2002-10-08 03:31:09 richard Exp $
+$Id: roundup_server.py,v 1.15 2002-11-05 22:59:46 richard Exp $
"""
# python version check
co = filter(None, self.headers.getheaders('cookie'))
if co:
env['HTTP_COOKIE'] = ', '.join(co)
+ env['HTTP_AUTHORIZATION'] = self.headers.getheader('authorization')
env['SCRIPT_NAME'] = ''
env['SERVER_NAME'] = self.server.server_name
env['SERVER_PORT'] = str(self.server.server_port)
diff --git a/test/test_mailgw.py b/test/test_mailgw.py
index af81ce6a81a627855944b9c63f67d6475046133e..f8332b618c3f8d9605bb6781302d818ad8fdd8c5 100644 (file)
--- a/test/test_mailgw.py
+++ b/test/test_mailgw.py
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: test_mailgw.py,v 1.32 2002-09-26 03:04:24 richard Exp $
+# $Id: test_mailgw.py,v 1.33 2002-11-05 22:59:46 richard Exp $
import unittest, cStringIO, tempfile, os, shutil, errno, imp, sys, difflib
# and open the database
self.db = self.instance.open('admin')
self.db.user.create(username='Chef', address='chef@bork.bork.bork',
- roles='User')
+ realname='Bork, Chef', roles='User')
self.db.user.create(username='richard', address='richard@test',
roles='User')
self.db.user.create(username='mary', address='mary@test',
- roles='User')
+ roles='User', realname='Contrary, Mary')
self.db.user.create(username='john', address='john@test',
- alternate_addresses='jondoe@test\njohn.doe@test', roles='User')
+ alternate_addresses='jondoe@test\njohn.doe@test', roles='User',
+ realname='John Doe')
def tearDown(self):
if os.path.exists(os.environ['SENDMAILDEBUG']):
Content-Type: text/plain
Subject: [issue1] Testing...
To: chef@bork.bork.bork, mary@test, richard@test
-From: "Chef" <issue_tracker@your.tracker.email.domain.example>
-Reply-To: "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+From: "Bork, Chef" <issue_tracker@your.tracker.email.domain.example>
+Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
MIME-Version: 1.0
Message-Id: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
Content-Transfer-Encoding: quoted-printable
-New submission from Chef <chef@bork.bork.bork>:
+New submission from Bork, Chef <chef@bork.bork.bork>:
This is a test submission of a new issue.
nosy: Chef, mary, richard
status: unread
title: Testing...
-_________________________________________________________________________
-"Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+_______________________________________________________________________
+Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
http://your.tracker.url.example/issue1
-_________________________________________________________________________
+_______________________________________________________________________
''')
# BUG
Content-Type: text/plain
Subject: [issue1] Testing...
To: chef@bork.bork.bork, richard@test
-From: "mary" <issue_tracker@your.tracker.email.domain.example>
-Reply-To: "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+From: "Contrary, Mary" <issue_tracker@your.tracker.email.domain.example>
+Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
MIME-Version: 1.0
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
Content-Transfer-Encoding: quoted-printable
-mary <mary@test> added the comment:
+Contrary, Mary <mary@test> added the comment:
This is a second followup
----------
status: unread -> chatting
-_________________________________________________________________________
-"Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+_______________________________________________________________________
+Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
http://your.tracker.url.example/issue1
-_________________________________________________________________________
+_______________________________________________________________________
''')
def testFollowup(self):
Content-Type: text/plain
Subject: [issue1] Testing...
To: chef@bork.bork.bork, john@test, mary@test
-From: "richard" <issue_tracker@your.tracker.email.domain.example>
-Reply-To: "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+From: richard <issue_tracker@your.tracker.email.domain.example>
+Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
MIME-Version: 1.0
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
assignedto: -> mary
nosy: +john, mary
status: unread -> chatting
-_________________________________________________________________________
-"Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+_______________________________________________________________________
+Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
http://your.tracker.url.example/issue1
-_________________________________________________________________________
+_______________________________________________________________________
''')
def testFollowupTitleMatch(self):
Content-Type: text/plain
Subject: [issue1] Testing...
To: chef@bork.bork.bork, john@test, mary@test
-From: "richard" <issue_tracker@your.tracker.email.domain.example>
-Reply-To: "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+From: richard <issue_tracker@your.tracker.email.domain.example>
+Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
MIME-Version: 1.0
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
assignedto: -> mary
nosy: +john, mary
status: unread -> chatting
-_________________________________________________________________________
-"Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+_______________________________________________________________________
+Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
http://your.tracker.url.example/issue1
-_________________________________________________________________________
+_______________________________________________________________________
''')
def testFollowupNosyAuthor(self):
Content-Type: text/plain
Subject: [issue1] Testing...
To: chef@bork.bork.bork, richard@test
-From: "john" <issue_tracker@your.tracker.email.domain.example>
-Reply-To: "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+From: John Doe <issue_tracker@your.tracker.email.domain.example>
+Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
MIME-Version: 1.0
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
Content-Transfer-Encoding: quoted-printable
-john <john@test> added the comment:
+John Doe <john@test> added the comment:
This is a followup
----------
nosy: +john
status: unread -> chatting
-_________________________________________________________________________
-"Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+_______________________________________________________________________
+Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
http://your.tracker.url.example/issue1
-_________________________________________________________________________
+_______________________________________________________________________
''')
Content-Type: text/plain
Subject: [issue1] Testing...
To: chef@bork.bork.bork
-From: "richard" <issue_tracker@your.tracker.email.domain.example>
-Reply-To: "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+From: richard <issue_tracker@your.tracker.email.domain.example>
+Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
MIME-Version: 1.0
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
----------
nosy: +john
status: unread -> chatting
-_________________________________________________________________________
-"Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+_______________________________________________________________________
+Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
http://your.tracker.url.example/issue1
-_________________________________________________________________________
+_______________________________________________________________________
''')
Content-Type: text/plain
Subject: [issue1] Testing...
To: chef@bork.bork.bork, john@test, richard@test
-From: "john" <issue_tracker@your.tracker.email.domain.example>
-Reply-To: "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+From: John Doe <issue_tracker@your.tracker.email.domain.example>
+Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
MIME-Version: 1.0
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
Content-Transfer-Encoding: quoted-printable
-john <john@test> added the comment:
+John Doe <john@test> added the comment:
This is a followup
----------
nosy: +john
status: unread -> chatting
-_________________________________________________________________________
-"Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+_______________________________________________________________________
+Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
http://your.tracker.url.example/issue1
-_________________________________________________________________________
+_______________________________________________________________________
''')
Content-Type: text/plain
Subject: [issue1] Testing...
To: chef@bork.bork.bork, richard@test
-From: "john" <issue_tracker@your.tracker.email.domain.example>
-Reply-To: "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+From: John Doe <issue_tracker@your.tracker.email.domain.example>
+Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
MIME-Version: 1.0
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
Content-Transfer-Encoding: quoted-printable
-john <john@test> added the comment:
+John Doe <john@test> added the comment:
This is a followup
----------
status: unread -> chatting
-_________________________________________________________________________
-"Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+_______________________________________________________________________
+Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
http://your.tracker.url.example/issue1
-_________________________________________________________________________
+_______________________________________________________________________
''')
Content-Type: text/plain
Subject: [issue1] Testing...
To: chef@bork.bork.bork
-From: "richard" <issue_tracker@your.tracker.email.domain.example>
-Reply-To: "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+From: richard <issue_tracker@your.tracker.email.domain.example>
+Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
MIME-Version: 1.0
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
----------
status: unread -> chatting
-_________________________________________________________________________
-"Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+_______________________________________________________________________
+Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
http://your.tracker.url.example/issue1
-_________________________________________________________________________
+_______________________________________________________________________
''')
Content-Type: text/plain
Subject: [issue1] Testing...
To: chef@bork.bork.bork, richard@test
-From: "mary" <issue_tracker@your.tracker.email.domain.example>
-Reply-To: "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+From: "Contrary, Mary" <issue_tracker@your.tracker.email.domain.example>
+Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
MIME-Version: 1.0
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
Content-Transfer-Encoding: quoted-printable
-mary <mary@test> added the comment:
+Contrary, Mary <mary@test> added the comment:
A message with encoding (encoded oe =F6)
----------
status: unread -> chatting
-_________________________________________________________________________
-"Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+_______________________________________________________________________
+Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
http://your.tracker.url.example/issue1
-_________________________________________________________________________
+_______________________________________________________________________
''')
Content-Type: text/plain
Subject: [issue1] Testing...
To: chef@bork.bork.bork, richard@test
-From: "mary" <issue_tracker@your.tracker.email.domain.example>
-Reply-To: "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+From: "Contrary, Mary" <issue_tracker@your.tracker.email.domain.example>
+Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
MIME-Version: 1.0
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
Content-Transfer-Encoding: quoted-printable
-mary <mary@test> added the comment:
+Contrary, Mary <mary@test> added the comment:
A message with first part encoded (encoded oe =F6)
----------
status: unread -> chatting
-_________________________________________________________________________
-"Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+_______________________________________________________________________
+Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
http://your.tracker.url.example/issue1
-_________________________________________________________________________
+_______________________________________________________________________
''')
def testFollowupStupidQuoting(self):
Content-Type: text/plain
Subject: [issue1] Testing...
To: chef@bork.bork.bork
-From: "richard" <issue_tracker@your.tracker.email.domain.example>
-Reply-To: "Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+From: richard <issue_tracker@your.tracker.email.domain.example>
+Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
MIME-Version: 1.0
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
----------
status: unread -> chatting
-_________________________________________________________________________
-"Roundup issue tracker" <issue_tracker@your.tracker.email.domain.example>
+_______________________________________________________________________
+Roundup issue tracker <issue_tracker@your.tracker.email.domain.example>
http://your.tracker.url.example/issue1
-_________________________________________________________________________
+_______________________________________________________________________
''')
def suite():