[Digicool-CVS] CVS: CVSROOT - postcommit_actions:1.85
Ken Manheimer
klm@serenade.digicool.com
Wed, 7 Mar 2001 15:06:57 -0500
Update of /cvs-repository/CVSROOT
In directory serenade:/projects/users/klm/Operations/CVSROOT
Modified Files:
postcommit_actions
Log Message:
Well, lets include the diffs, shall we?
--- Updated File postcommit_actions in package CVSROOT --
--- postcommit_actions 2001/03/07 19:53:02 1.84
+++ postcommit_actions 2001/03/07 20:06:56 1.85
@@ -322,7 +322,7 @@
return entries
def do_mail(name, remote, repo, addrs, subjs,
- msgfilenm="", doing_directory=0, no_files=0):
+ msgfilenm, doing_directory=0, no_files=0):
"""Send notice about checkin to addresses dictated by traffic table.
We include a diff."""
@@ -344,7 +344,7 @@
if subjs[2] == 'New':
new_msg = ('--- Added directory %s in package %s ---\n'
% (repo, name))
- diff_msg = diff_msg + new_msg + '\n\n'
+ diff_msg = diff_msg + new_msg + '\n'
else:
subject = subject + " -"
for fn, old, new in subjs:
@@ -355,7 +355,7 @@
else:
new_msg = create_diff(name, repo, fn, old, new)
- diff_msg = diff_msg + new_msg + '\n\n'
+ diff_msg = diff_msg + new_msg + '\n'
cmd = ("%s%s%s %s -s '%s' %s" % ((VERBOSE and "set -x; ") or "",
(DRYRUN and "echo Would do: ") or "",
@@ -363,8 +363,10 @@
(VERBOSE and "-v") or "",
subject,
string.join(addrs, ",")))
- if msgfilenm:
- cmd = cmd + "< %s" % msgfilenm
+ mf = open(msgfilenm, 'a')
+ mf.write("\n%s" % diff_msg)
+ mf.close()
+ cmd = cmd + "< %s" % msgfilenm
if VERBOSE:
complain("%sDoing mail cmd:\n\t%s\n",
@@ -372,8 +374,6 @@
result = os.system(cmd)
if result:
note_failure("*** Mail failed with error %s...", result)
-
-
def create_diff(name, repo, file, old, new):
""" Create a diff comparing old and new versions """