[Zope-CVS] CVS: CVSROOT - postcommit_actions:1.131
Ken Manheimer
klm@zope.com
Tue, 28 Aug 2001 14:06:01 -0400
Update of /cvs-repository/CVSROOT
In directory cvs.zope.org:/tmp/cvs-serv5187
Modified Files:
postcommit_actions
Log Message:
This should take care of illegitemate change notice duplicates.
.find_entries(): only include item if it's not already in entries.
Also, tidied some VERBOSE operation flags a bit.
=== CVSROOT/postcommit_actions 1.130 => 1.131 ===
if VERBOSE:
- complain("Done.\n")
+ complain("** Done **\n\n")
if failures:
handle_failures(orig_args)
@@ -250,7 +250,8 @@
else:
# Obtain qualifying candidates:
for candidate in containers:
- if re.match(it['path'], candidate):
+ if (re.match(it['path'], candidate)
+ and it not in entries):
entries.append(it)
if entries:
@@ -403,26 +404,24 @@
'to': string.join(addrs, ", "),
'from': "%s <%s>" % (fullname, email),
'sender': OFFICIAL_SENDER,
- 'text': text,
'user': user}
- text = ("Subject: %(subject)s\n"
- "To: %(to)s\n"
- "From: %(from)s\n"
- "Sender: %(sender)s\n"
- "\n"
- "%(text)s"
- % envelope_info)
+ header = ("Subject: %(subject)s\n"
+ "To: %(to)s\n"
+ "From: %(from)s\n"
+ "Sender: %(sender)s\n"
+ % envelope_info)
+
+ notice = header + '\n' + text
cmd_in, cmd_out = os.popen2(cmd, 'rw')
- cmd_in.write(text)
+ cmd_in.write(notice)
cmd_in.close()
output = cmd_out.read()
result = cmd_out.close()
if VERBOSE:
- complain("%(user)s (%(from)s) sent to %(to)s, subject: '%(subject)s'\n"
- % envelope_info)
+ complain(header)
if result:
- note_failure("*** Mail cmd yielded output %s:\n%s\n",
+ note_failure("*** Mail cmd yielded unexpected result %s:\n%s\n",
result, output)
def loosen_file(fname):