From: Gary L P. <gar...@us...> - 2000-11-06 22:53:43
|
Update of /cvsroot/jtidy/CVSROOT In directory slayer.i.sourceforge.net:/tmp/cvs-serv1441 Modified Files: syncmail Log Message: Improve email message on cvs adds. Index: syncmail =================================================================== RCS file: /cvsroot/jtidy/CVSROOT/syncmail,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** syncmail 2000/11/05 19:49:33 1.2 --- syncmail 2000/11/06 22:53:19 1.3 *************** *** 82,93 **** return '***** Bogus filespec: %s' % filespec if oldrev == 'NONE': ! try: ! fp = open(file) ! lines = fp.readlines() ! fp.close() ! lines.insert(0, '--- NEW FILE ---\n') ! except IOError, e: ! lines = ['***** Error reading new file: ', ! str(e)] elif newrev == 'NONE': lines = ['--- %s DELETED ---\n' % file] --- 82,99 ---- return '***** Bogus filespec: %s' % filespec if oldrev == 'NONE': ! ##try: ! ## fp = open(file) ! ## lines = fp.readlines() ! ## fp.close() ! ## lines.insert(0, '--- NEW FILE ---\n') ! ##except IOError, e: ! ## lines = ['***** Error reading new file: ', ! ## str(e)] ! ## Code below added by GLP to produce proper email ! diffcmd = '/usr/bin/cvs -f checkout -kk -r %s -p %s' % ( ! newrev, file) ! fp = os.popen(diffcmd) ! lines = fp.readlines() ! sts = fp.close() elif newrev == 'NONE': lines = ['--- %s DELETED ---\n' % file] |