Mercurial > pub > buggler
view translate.pl @ 12:52b34ea50eff default tip
sync: work time projection doesn't seem to be working anyway
author | cin |
---|---|
date | Sun, 13 Sep 2015 19:37:16 +0300 |
parents | 4eb9fdf4efa9 |
children |
line wrap: on
line source
#!/usr/bin/perl -w use IMPL::require { BzClient => 'Benzin::Bugzilla::XmlRpcClient', BugWriter => 'Benzin::Bugzilla::XmlWriter' }; use YAML::XS qw(LoadFile Dump); use XML::Writer; use IPC::Run qw(start finish); my $config = LoadFile("config.yaml"); if ( !( $config->{bugzilla}{url} =~ /\/$/ ) ) { $config->{bugzilla}{url} .= "/"; } my $bz = BzClient->new( url => $config->{bugzilla}{url}, apikey => $config->{bugzilla}{apikey} ); my $bugs = $config->{bugzilla}{bugs} or die "No bugs specified"; $bugs = [$bugs] unless ref $bugs eq 'ARRAY'; local (*HIN); my $proc = start( #[ 'saxon8', '-novw', '-', 'bug-list.xsl' ], [ 'cat' ], '<pipe', \*HIN, '>', \*STDOUT ) or die "failed to create pipe: $!"; binmode *HIN, ":encoding(utf-8)"; my $writer = BugWriter->new( OUTPUT => *HIN, DATA_INDENT => 2, DATA_MODE => 'on' ); $writer->timereports('on'); $writer->timeresolution({minutes => 15}); eval { my %visited; my $fetched = $bz->GetBugsHierarchy( { ids => [283] } ); $bz->PopulateBugsComments($fetched); $bz->PopulateBugsHistory($fetched); $writer->WriteBugList($fetched); }; warn Dump($@) and die $@ if $@; close HIN; finish($proc); 1;