diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2005-04-27 09:50:26 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2005-04-27 09:50:26 +0000 |
commit | 4ba1358b2945a5d156ecad4711db9c58890cdeb9 (patch) | |
tree | 259634050b0f916c0e14bfb39af43cf77ad66031 | |
parent | 0325757ed2975020906fee9dd38086cfb9088bcc (diff) | |
download | fetchmail-4ba1358b2945a5d156ecad4711db9c58890cdeb9.tar.gz fetchmail-4ba1358b2945a5d156ecad4711db9c58890cdeb9.tar.bz2 fetchmail-4ba1358b2945a5d156ecad4711db9c58890cdeb9.zip |
Change: use SVN rather than RCS to check out code
Change: extract version from configure.ac rather than Makefile
svn path=/trunk/; revision=4042
-rwxr-xr-x | dist-tools/getstats.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/dist-tools/getstats.py b/dist-tools/getstats.py index f957c7d3..33ddfd7e 100755 --- a/dist-tools/getstats.py +++ b/dist-tools/getstats.py @@ -2,12 +2,19 @@ # # Collect statistics on current release. -import commands, string, ftplib +import commands, os, string, ftplib # Get version and date date = commands.getoutput("date") -ln = commands.getoutput("co -p RCS/*.[chly],v 2>/dev/null | wc -l") -vers = commands.getoutput("sed -n -e '/VERSION/s/VERSION *= *\\(.*\\)/\\1/p' <Makefile") +pid = os.getpid() +# this is a fast variant using the base of the current working directory +# (ignores uncommitted modifications) +os.system("svn export -rBASE . /tmp/getstats.%d" % pid) +# this is a slower variant that may export the whole tree across the net +#os.system("svn export -rCOMMITTED . /tmp/getstats.%d" % pid) +ln = commands.getoutput("cat /tmp/getstats.%d/*.[chly] 2>/dev/null | wc -l" % pid) +os.system("rm -rf /tmp/getstats.%d" % pid) +vers = commands.getoutput("sed -n -e '/AC_INIT/s/AC_INIT(\[.*\],\[\\(.*\\)\])/\\1/p' <configure.ac") print "fetchmail-" + vers + " (" + date + "), " + string.strip(ln) + " lines:" # Use local listsize command to grab list statistics |