Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix log generation
We were generating a log based on all branches. This was fine for the
Linux kernel, but for MariaDB there are a bunch of branches that can
skew statistics, these fall into two categories:

1. Branches of feature development that are not in the main branches
2. Preview release branches

The latter can have duplicate commits with different histories which
cause duplicate commits in statistics.

We now filter by main development branches only.
  • Loading branch information
LinuxJedi committed Oct 21, 2022
1 parent 91727e5 commit 2b40899
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions commits/config/mariadb_server/aliases
Expand Up @@ -8,6 +8,7 @@
108760288+mariadb-luislizardo@users.noreply.github.com luis.lizardo@mariadb.com
43503225+pleblanc1976@users.noreply.github.com patrick.leblanc@mariadb.com
46791326+rucha174@users.noreply.github.com rucha.deodhar@mariadb.com
50832275+hartmut-mariadb@users.noreply.github.com hartmut@mariadb.com
61234003+mysqlonarm@users.noreply.github.com mysqlonarm@gmail.com
62115046+mariadb-romannavrotskiy@users.noreply.github.com roman.nozdrin@mariadb.com
72864488+mariadb-sergeyzefirov@users.noreply.github.com sergey.zefirov@mariadb.com
Expand Down
2 changes: 2 additions & 0 deletions commits/config/mariadb_server/employers
Expand Up @@ -45,7 +45,9 @@ daniel@mariadb.org IBM < 2020-07-14
daniel@mariadb.org MariaDB Foundation
daniel.nachun@gmail.com Independent
dansolo@mail.ru Independent
darren.zhang.zb@gmail.com Amazon
devnexen@gmail.com Independent
dingweiqings@163.com Independent
dominik.b.czarnota@gmail.com Trail of Bits
eric@freesa.org MariaDB Foundation
eirinikos@gmail.com Independent
Expand Down
20 changes: 15 additions & 5 deletions commits/parse_git_log.sh
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

if [ "$#" -ne 3 ]; then
echo "Usage: $0 <GITHUB_PATH> <START_DATE> <END_DATE>"
Expand All @@ -12,16 +12,26 @@ TREE=$(basename $1)
# End date is exclusive so need to add one day to it
END_DATE=$(date +%Y-%m-%d -d "$3+1 day")
if [ -d "$TREE" ]; then
echo "Updating server repo"
echo "Updating repo $1"
cd $TREE
git pull --ff-only
git fetch
cd ..
else
echo "Cloning server repo"
echo "Cloning repo $1"
git clone https://github.com/$1 --no-tags
fi
echo "Extracting git log"
git --git-dir $TREE/.git log --all --numstat -M --since-as-filter="$2" --until="$END_DATE" > git.log
if [ $TREE = "server" ]; then
BRANCHES="--remotes=\"origin/10.[0-9]\" --remotes=\"origin/10.1[0-9]\""
elif [ $TREE = "mariadb-columnstore-engine" ]; then
BRANCHES="--remotes=\"origin/develo?\" --remotes=\"origin/develop-1.[0-9]\" --remotes=\"origin/develop-[5-9]\""
elif [ $TREE = "libmarias3" ]; then
BRANCHES="origin/master"
else
BRANCHES="--all"
fi
COMMAND="git --git-dir $TREE/.git log ${BRANCHES} --numstat -M --since-as-filter=\"$2\" --until=\"$END_DATE\" > git.log"
eval "$COMMAND"
cd ..
echo "Generating category config"
./parse_categories.py
Expand Down

0 comments on commit 2b40899

Please sign in to comment.