diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2010-03-28 17:29:36 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2010-03-28 17:33:33 +0200 |
commit | 4835749509a65dfe449fbcbdb6386af2cb768c10 (patch) | |
tree | 005aafab002c8a44f581fbae07523cb78df04a0e /dist-tools/getstats.py | |
parent | fe5aab091d09a755f7606f3eac57970efd34e2bc (diff) | |
download | fetchmail-4835749509a65dfe449fbcbdb6386af2cb768c10.tar.gz fetchmail-4835749509a65dfe449fbcbdb6386af2cb768c10.tar.bz2 fetchmail-4835749509a65dfe449fbcbdb6386af2cb768c10.zip |
Update for 6.3.15 release.
Diffstat (limited to 'dist-tools/getstats.py')
-rwxr-xr-x | dist-tools/getstats.py | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/dist-tools/getstats.py b/dist-tools/getstats.py index df2fbeaf..f48c153a 100755 --- a/dist-tools/getstats.py +++ b/dist-tools/getstats.py @@ -4,28 +4,20 @@ import commands, os, string, ftplib -print "This script must be adjusted for Git." -exit(1) - # Get version and date -date = commands.getoutput("LC_TIME=C date -u") +date = commands.getoutput("LC_TIME=C date +'%Y-%m-%d'") pid = os.getpid() -if True: - # this is a fast variant using the base of the current working directory - # (ignores uncommitted modifications) - cmd = "svn export -q -rBASE . /tmp/getstats.%d" % pid -else: - # this is a slower variant that may export the whole tree across - # the net - cmd = "svn export -rCOMMITTED . /tmp/getstats.%d" % pid +os.mkdir("/tmp/getstats.%d" % pid) + +cmd = "git archive --format=tar HEAD | ( cd /tmp/getstats.%d && tar -xf -)" % pid if os.system(cmd): - print "SVN FAILED" + print "git-archive FAILED" os.exit(1) 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:" +print "fetchmail-" + vers + " (released " + date + ", " + string.strip(ln) + " LoC):" # end of getstats.py |