Revision: 8875 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8875&view=rev Author: jdh2358 Date: 2011-01-03 19:00:11 +0000 (Mon, 03 Jan 2011)
Log Message: ----------- added developer commit history example for annual purge Added Paths: ----------- trunk/matplotlib/examples/misc/developer_commit_history.py Added: trunk/matplotlib/examples/misc/developer_commit_history.py =================================================================== --- trunk/matplotlib/examples/misc/developer_commit_history.py (rev 0) +++ trunk/matplotlib/examples/misc/developer_commit_history.py 2011-01-03 19:00:11 UTC (rev 8875) @@ -0,0 +1,44 @@ +""" +report how many days it has been since each developer committed. You +must do an + +svn log > log.txt + +and place the output next to this file before running + +""" +import os, datetime + +import matplotlib.cbook as cbook + +todate = cbook.todate('%Y-%m-%d') +today = datetime.date.today() +if not os.path.exists('log.txt'): + print('You must place the "svn log" output into a file "log.txt"') + raise SystemExit + +parse = False + +lastd = dict() +for line in file('log.txt'): + if line.startswith('--------'): + parse = True + continue + + if parse: + parts = [part.strip() for part in line.split('|')] + developer = parts[1] + dateparts = parts[2].split(' ') + ymd = todate(dateparts[0]) + + + if developer not in lastd: + lastd[developer] = ymd + + parse = False + +dsu = [((today - lastdate).days, developer) for developer, lastdate in lastd.items()] + +dsu.sort() +for timedelta, developer in dsu: + print('%s : %d'%(developer, timedelta)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins