diff options
author | Neil Moore <neil@s-z.org> | 2012-12-12 17:45:52 -0600 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2012-12-12 17:45:52 -0600 |
commit | eb0db5d7c862cf92f1457dcfccfabc18f0353e76 (patch) | |
tree | 1aea9f6b6b60e73b9d3f90d79fac768e87b6de24 | |
parent | 350fd476056b460968449af0d3b7cabc5e203f35 (diff) | |
download | crawlbot-eb0db5d7c862cf92f1457dcfccfabc18f0353e76.tar.gz crawlbot-eb0db5d7c862cf92f1457dcfccfabc18f0353e76.zip |
Add some debugging messages.
-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; |