| 102 |
from cStringIO import StringIO |
from cStringIO import StringIO |
| 103 |
|
|
| 104 |
# Which SMTP server to do we connect to? Empty string means localhost. |
# Which SMTP server to do we connect to? Empty string means localhost. |
| 105 |
MAILHOST = '' |
MAILHOST = 'www.kohsuke.org' |
| 106 |
MAILPORT = 25 |
MAILPORT = 25 |
| 107 |
|
|
| 108 |
# Diff trimming stuff |
# Diff trimming stuff |
| 134 |
sys.exit(code) |
sys.exit(code) |
| 135 |
|
|
| 136 |
|
|
| 137 |
|
|
| 138 |
def calculate_diff(filespec, contextlines): |
def calculate_diff(filespec, contextlines): |
| 139 |
file, oldrev, newrev = string.split(filespec, ',') |
file, oldrev, newrev = string.split(filespec, ',') |
| 140 |
# Make sure we can find a CVS version number |
# Make sure we can find a CVS version number |
| 208 |
return string.join(lines, '') |
return string.join(lines, '') |
| 209 |
|
|
| 210 |
|
|
| 211 |
|
|
| 212 |
def blast_mail(subject, people, filestodiff, contextlines, fromhost): |
def blast_mail(subject, people, filestodiff, contextlines, fromhost): |
| 213 |
# cannot wait for child process or that will cause parent to retain cvs |
# cannot wait for child process or that will cause parent to retain cvs |
| 214 |
# lock for too long. Urg! |
# lock for too long. Urg! |
| 245 |
os._exit(0) |
os._exit(0) |
| 246 |
|
|
| 247 |
|
|
| 248 |
|
|
| 249 |
# scan args for options |
# scan args for options |
| 250 |
def main(): |
def main(): |
| 251 |
try: |
try: |
| 317 |
print 'Generating notification message... done.' |
print 'Generating notification message... done.' |
| 318 |
|
|
| 319 |
|
|
| 320 |
|
|
| 321 |
if __name__ == '__main__': |
if __name__ == '__main__': |
| 322 |
main() |
main() |
| 323 |
sys.exit(0) |
sys.exit(0) |