3 # Collect statistics on current release.
5 import commands, os, string, ftplib
8 date = commands.getoutput("LC_TIME=C date -u")
11 # this is a fast variant using the base of the current working directory
12 # (ignores uncommitted modifications)
13 cmd = "svn export -q -rBASE . /tmp/getstats.%d" % pid
15 # this is a slower variant that may export the whole tree across
17 cmd = "svn export -rCOMMITTED . /tmp/getstats.%d" % pid
23 ln = commands.getoutput("cat /tmp/getstats.%d/*.[chly] 2>/dev/null | wc -l" % pid)
24 os.system("rm -rf /tmp/getstats.%d" % pid)
25 vers = commands.getoutput("sed -n -e '/AC_INIT/s/AC_INIT(\\[.\\+\\],\\[\\(.*\\)\\],.*)/\\1/p' <configure.ac")
26 print "fetchmail-" + vers + " (" + date + "), " + string.strip(ln) + " lines:"