On Tue, Aug 17, 2010 at 09:21, Robert Haas <[email protected]> wrote:
> On Tue, Aug 17, 2010 at 10:51 AM, Alex Hunsaker <[email protected]> wrote:
>> On Tue, Aug 17, 2010 at 08:17, Robert Haas <[email protected]> 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;
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers