Re: Todays git migration results

From: Alex Hunsaker <badalex(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Todays git migration results
Date: 2010-08-17 15:46:27
Message-ID: AANLkTi=eoVC7hz89hsoR4m_c4Cj66_-ropNY_R18iPkW@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 17, 2010 at 09:21, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Aug 17, 2010 at 10:51 AM, Alex Hunsaker <badalex(at)gmail(dot)com> wrote:
>> On Tue, Aug 17, 2010 at 08:17, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> /me is very sorry master.  Please beat your unworthy servant only
>>> lightly...  or alternatively, buy me a faster machine.
>>
>> Well, I might be able to afford a beer.
>
> Done!

Well on 2nd thought, maybe not... If people start collecting I'll be
broke (notably I owe tom quite a few :-).

Anyway find below version that passes any arguments through to git-log.

Now you can do git-topo-order --since='1 year', takes a whopping
0.430s for me :-)

--
--- git-topo-order (1) 2010-08-17 09:44:18.069517261 -0600
+++ git-topo-order 2010-08-17 09:45:34.109812004 -0600
@@ -26,6 +26,7 @@
use strict;
use warnings;
require Date::Calc;
+use IPC::Open2;

my @BRANCHES = qw(master REL9_0_STABLE REL8_4_STABLE REL8_3_STABLE
REL8_2_STABLE REL8_1_STABLE REL8_0_STABLE REL7_4_STABLE);
@@ -34,11 +35,13 @@
my %all_commits_by_branch;

my %commit;
+my %position;
for my $branch (@BRANCHES) {
my $commitnum = 0;
- open(GITLOG, "git log --date=iso origin/$branch |")
+ $position{$branch} = 0;
+ open2(my $git_out, my $git_in, qw(git log --date=iso), @ARGV,
"origin/$branch")
|| die "can't run git log origin/$branch: $!";
- while (my $line = <GITLOG>) {
+ while (my $line = <$git_out>) {
if ($line =~ /^commit\s+(.*)/) {
push_commit(\%commit) if %commit;
%commit = (
@@ -60,10 +63,6 @@
}
}

-my %position;
-for my $branch (@BRANCHES) {
- $position{$branch} = 0;
-}
while (1) {
my $best_branch;
my $best_inversions;

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Cédric Villemain 2010-08-17 16:44:00 Re: PL/pgSQL EXECUTE '..' USING with unknown
Previous Message Tom Lane 2010-08-17 15:36:32 Re: outPlannedStmt missing transientPlan