diff options
-rw-r--r-- | lib/Crawl/Bot.pm | 5 | ||||
-rw-r--r-- | lib/Crawl/Bot/Plugin/Commit.pm | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/Crawl/Bot.pm b/lib/Crawl/Bot.pm index 0ddf57e..f6bf7b9 100644 --- a/lib/Crawl/Bot.pm +++ b/lib/Crawl/Bot.pm @@ -61,7 +61,10 @@ before say => sub { sub tick { my $self = shift; warn "Checking for updates..."; - $_->tick for @{ $self->plugins }; + for (@{ $self->plugins }) { + warn "...$_"; + $_->tick + } warn "Done"; return $self->update_time; } diff --git a/lib/Crawl/Bot/Plugin/Commit.pm b/lib/Crawl/Bot/Plugin/Commit.pm index 3575c73..0189886 100644 --- a/lib/Crawl/Bot/Plugin/Commit.pm +++ b/lib/Crawl/Bot/Plugin/Commit.pm @@ -138,9 +138,11 @@ sub said { sub tick { my $self = shift; my $dir = pushd($self->checkout); + warn "fetch"; system('git fetch'); for my $branch ($self->branches) { my $old_head = $self->head($branch) || ''; + warn "rev-parse $branch"; my $head = `git rev-parse $branch`; chomp ($old_head, $head); next if $old_head eq $head; @@ -148,7 +150,9 @@ sub tick { # Exclude merges from master into other branches. my $exclude_master = $branch eq "master" ? "" : "^master"; my $exclude_old = $old_head ? "^$old_head" : ""; + warn "rev-list $head $exclude_old $exclude_master"; my @revs = split /\n/, `git rev-list $head $exclude_old $exclude_master`; + warn "rev-list done"; if (!$self->has_branch($branch)) { my $nrev = scalar @revs; |