On 07/04/2012 10:52 PM, Sumana Harihareswara wrote:
For use in our monthly report, due to come out tomorrow
https://www.mediawiki.org/wiki/Wikimedia_engineering_report/2012/June
I'd like to know how many unique contributors ("owners") had commits merged into the mediawiki & mediawiki/* Gerrit projects between June 1-30 inclusive. I've had luck in using "age:4d -age:34d status:merged project:^mediawiki.* -owner:L10n-bot" as a search on https://gerrit.wikimedia.org to get a big paginated table of all the commits (and then I figure I'd look for all the unique owner names and count them), but when I try that on the command line as
ssh -p 29418 gerrit.wikimedia.org gerrit query 'age:4d -age:34d status:merged project:^mediawiki.* -owner:L10n-bot'
I get the error "fatal: "-age:34d" is not a valid option".
I'll accept either help in running this query correctly so I get the giant table on the command line so I can gin up the status myself, or I will simply accept a number if you want to do my homework for me. :-)
Got help from Mark Holmquist and advice from Giovanni Luca Ciampaglia -- needed to use double quote marks. Mark wrote:
It's because you've passed in that string (which was good) as one argument to the SSH command, which is then read as multiple arguments on the remote server. This works for me, adding double quotes around the remote command:
ssh -p 29418 gerrit.wikimedia.org "gerrit query 'age:4d -age:34d status:merged project:^mediawiki.* -owner:L10n-bot'"
Mark then also wrote:
Hm, the SSH interface only returns 500 at a time, and won't accept limit: keywords to the contrary. I've hacked together some results, but I wouldn't recommend reproducing it by hand. I could write up a script with minimal effort, I think.
It took 3 queries but he got all 1401 results. And with that:
$ grep ' name:' wmf-results.txt | sort -u | wc -l 92
So, 92 unique committers in June. Which is way better than Ohloh has been saying, yay.