blob: 53355628d9998eb0ca3491e351fabfcfba378f28 [file] [log] [blame]
# Utility, originally from Matthias Sohn (bug 450186), to check who has
# committed to "" repo, but then has not, for one year.
# Part of a routine yearly process to remove inactive committers from
# callisto-dev.
# In general, besides these "commit records" some people want to be left on,
# as "backups" for their projects.
# And, a few cases of "people recently added" so they would not have had time
# yet to commit.
# For 2014 effort, in November/December of 2014, see
# This script can be ran in an "complete clone" of
# Note that this script will not capture those in the "calisto-dev"
# group who have never contributed to the "git repo".
# Note too, that in future, it will continue to "re-find" people who hae been removed already,
# from callisto-dev. May want to adjust "authors" to be "only authors since November, 2013,
# since any prior to that will have been "dealt with" already? And/or find a better way
# to automate this "git listing" with the "listing" of ids from callisto-dev list.
pushd $BUILD_DIR
allauthors() { git shortlog --all -sen | cut -s -f2 | sort; }
authors() { git shortlog --all -sn | cut -s -f2 | sort; }
lastyear() { git shortlog --all -sn --since="1 year ago" | cut -s -f2 | sort; }
# allauthors is used, instead of authors, to write a temporary file, allauthors.txt,
# that can be used to improve the .mailmap file,
# which is in root of repository, and makes sure the mistakes or changes
# in names or emails get mapped to just one name and email. Having a good
# .mailmap file improves the "final output" quite a bit. Otherwise, the report may show
# same person on both active and inactive lists, and other anomilies, depending on which id they
# used for the commit.
# get "date of run" for putting in files.
now=$( date --utc +%s )
echo -e "\n\t\tReport as of $( date --utc -d @$now ) \n" >$ALL_AUTHORS_FILE
allauthors >> $ALL_AUTHORS_FILE
echo -e "\n\t\tReport as of $( date --utc -d @$now ) \n" >$COMMITTER_LIST_FILE
echo "Active during last year" >>$COMMITTER_LIST_FILE
echo "=======================" >>$COMMITTER_LIST_FILE
echo "Inactive during last year" >>$COMMITTER_LIST_FILE
echo "=========================" >>$COMMITTER_LIST_FILE
comm -13 <(lastyear) <(authors) >>$COMMITTER_LIST_FILE
echo -e "\n\t\tOutput written to $COMMITTER_LIST_FILE"