From c5ac95a1e3c2e25188cd4cf4aee671048a0f9236 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 2 Jun 2010 20:19:08 +0200 Subject: [PATCH] Add a script to list the fixed issues from GoogleCode's 'updates' link Signed-off-by: Johannes Schindelin --- share/msysGit/googlecode-changes.perl | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 share/msysGit/googlecode-changes.perl diff --git a/share/msysGit/googlecode-changes.perl b/share/msysGit/googlecode-changes.perl new file mode 100644 index 00000000..2486bf3e --- /dev/null +++ b/share/msysGit/googlecode-changes.perl @@ -0,0 +1,57 @@ +#!/usr/bin/perl + +if (@ARGV != 1) { + print STDERR < +EOF + exit(1); +} + +use Date::Parse; +use HTML::Entities; + +my $since = `git show -s --format=%ct $ARGV[0]^0 2> /dev/null`; +chomp($since); +if ($since eq '') { + $since = str2time($ARGV[0]); +} + +$url = 'http://code.google.com/p/msysgit/updates/list?num=50&start='; + +my ($offset, $date, $issue, $oneline); + +sub get_fixes ($) { + $offset = shift; + + open IN, 'curl -s "' . $url . $offset . '" |'; + while () { + if (/]*>([^<]+); + if (/^\s*\((.+)\) Status changed/) { + $oneline = decode_entities($1); + while () { + if (/^<\/div>/) { + last; + } + if (/Fixed<\/span>/) { + print "Issue $issue ($oneline) was fixed\n"; + } + } + } + } + } + close IN; + return 1; +} + +for (my $off = 0; $off < 250 && get_fixes($off); $off += 50) { + # do nothing +} -- 2.11.4.GIT