Branch Coverage

blib/lib/Rcs/Agent.pm
Criterion Covered Total %
branch 41 256 16.0


line true false branch
99 7 0 if @_
111 7 28 if defined $args{$tag}
115 7 0 unless defined $$self{'suffix'}
118 0 7 unless defined $$self{'file'}
121 6 1 if ($$self{'file'} =~ m[/])
124 6 0 if ($dir =~ m[^/]) { }
129 0 0 defined $$self{'workdir'} ? :
134 1 6 unless defined $$self{'workdir'}
137 0 7 unless -d $$self{'workdir'}
147 7 0 unless (defined $$self{'rcsdir'})
149 0 7 if (-d $$self{'workdir'} . '/RCS' and -e $$self{'workdir'} . '/RCS/' . $$self{'file'} . $$self{'suffix'}) { }
0 7 elsif (-e $$self{'workdir'} . '/' . $$self{'file'} . $$self{'suffix'}) { }
159 0 7 -d $$self{'workdir'} . '/RCS' ? :
168 0 7 if $^O eq 'hpux'
212 0 0 unless $self->parse
236 0 0 unless (defined $sb)
263 0 6 -r $$self{'rcsfile'} ? :
284 0 5 if ($$self{'parsed'})
286 0 0 if $mtime == $self->timestamp
289 5 0 unless ($self->archived)
295 0 0 if (defined $$self{'parsing'})
303 0 0 if defined $$self{$tag}
306 0 0 unless (open INPUT, $$self{'rcsfile'})
325 0 0 if ($token =~ /^access/)
327 0 0 if @access
331 0 0 if ($token =~ /^head\s+([\d\.]+)/)
336 0 0 if ($token =~ /^strict/)
341 0 0 if ($token =~ /^symbols/)
344 0 0 unless $tag =~ /(.*):(.*)/
350 0 0 if ($token =~ /^locks/)
353 0 0 unless $tag =~ /(.*):(.*)/
364 0 0 unless $data =~ /([\d\.]+)\s+(.*)/
367 0 0 if $branches{$revision}
372 0 0 if ($token =~ /^next\s+([\d\.]+)/)
384 0 0 if ($revision =~ /^\d+\.\d+$/)
398 0 0 if ($token =~ /^author\s+(\S+)/)
403 0 0 if ($token =~ /^state\s+(\S+)/)
408 0 0 if ($token =~ /^date\s+(\S+)/)
413 0 0 if ($token =~ /^branches/)
415 0 0 unless $#symtokens >= 0
426 0 0 unless $nextrev or scalar %branches
437 0 0 if (not $intext and $data =~ /^desc/)
443 0 0 if ($intext == 1 and $data =~ /^\@/)
449 0 0 if ($intext and $data =~ /[^\@]*\@$/)
451 0 0 if $data
456 0 0 if $intext
469 0 0 if not $revision and $data =~ /^\s*$/
474 0 0 if ($data =~ /^log/)
477 0 0 if $data =~ /./
479 0 0 if ($data =~ /(|[^\@])\@$/)
481 0 0 if $data
489 0 0 if ($data =~ /^text/)
496 0 0 if ($data =~ /(|[^\@])\@$/)
501 0 0 if ($revision eq $$self{'head'}) { }
0 0 elsif ($data =~ /^d\d+\s+(\d+)$/) { }
0 0 elsif ($data =~ /^a\d+\s+(\d+)$/) { }
511 0 0 if $data =~ /(|[^\@])\@$/
517 0 0 if ($revision eq $$self{'head'})
529 0 0 if ($revision =~ /^\d+\.\d+$/) { }
587 2 0 unless $self->parse
597 0 0 unless (defined $args{'format'})
602 0 0 if ($args{'format'} =~ /^($validformats)$/i) { }
609 0 0 unless defined $rev
611 0 0 unless (defined $$self{'revisions'}{$rev} or defined $$self{'symbols'}{$rev})
620 0 0 $$self{'hpux'} ? :
625 0 0 if ($exitcode > 1)
679 1 0 unless defined $args{'log'} and $args{'log'} =~ /\S/
684 0 1 if (defined $args{'tag'})
685 0 0 defined $args{'force'} && istrue($args{'force'}) ? :
689 0 1 defined $args{'lock'} ? :
690 0 1 defined $args{'checkout'} || $lock ? :
692 0 1 if ($lock) { }
1 0 elsif ($checkout) { }
698 0 1 if (defined $args{'revision'})
699 0 0 unless ($args{'revision'} =~ /^\d[\d\.]*\d$/)
703 0 0 if (defined $$self{'revisions'}{$args{'revision'}})
714 1 0 if ($exitcode > 0)
758 0 0 unless $self->parse
760 0 0 if defined $args{'lock'} and istrue($args{'lock'})
763 0 0 if ($$self{'hpux'}) { }
764 0 0 if (defined $args{'force'} and istrue($args{'force'}))
768 0 0 if defined $args{'force'} and istrue($args{'force'})
771 0 0 if (defined $args{'revision'})
772 0 0 unless $self->rexists('revision', $args{'revision'})
780 0 0 if ($exitcode > 0)
824 1 0 unless $self->parse
826 0 0 if (defined $args{'lock'}) { }
827 0 0 istrue($args{'lock'}) ? :
834 0 0 if (defined $args{'revision'})
835 0 0 unless $self->rexists('revision', $args{'revision'})
843 0 0 if ($exitcode > 0)
907 0 1 if ($self->archived)
912 0 1 unless defined $args{'description'} and $args{'description'} =~ /\S/
914 0 1 if $args{'binary'}
915 1 0 if $args{'description'}
921 1 0 if ($exitcode > 0)
951 0 0 unless $self->parse
953 0 0 unless (defined $args{'revision'})
960 0 0 unless (defined $$self{'revisions'})
965 0 0 if (defined $$self{'revisions'}{$revision})
1003 0 0 unless $self->parse
1005 0 0 defined $args{'revision'} ? :
1007 0 0 unless $self->rexists('revision', $revision)
1030 0 0 unless $self->parse
1032 0 0 defined $args{'revision'} ? :
1034 0 0 unless $self->rexists('revision', $revision)
1059 0 0 unless $self->parse
1084 0 0 unless $self->parse
1110 0 0 unless $self->parse
1112 0 0 unless exists $$self{'access'}
1114 0 0 unless my(@array) = @{$$self{'access'};}
1148 1 0 unless $self->parse
1150 0 0 if ($args{'description'})
1157 0 0 if ($exitcode > 1)
1207 0 0 unless $method =~ /^(access|locked|locker|state|author|date|log)$/
1210 0 0 if $method eq 'locked'
1214 0 0 unless $self->parse
1216 0 0 defined $args{'revision'} ? :
1218 0 0 unless $self->rexists('revision', $revision)
1220 0 0 if (defined $$self{'revisions'}{$revision}{$method})
1260 0 2 unless (defined $args{'command'})
1265 0 2 defined $$self{'tmpdir'} ? :
1266 0 2 unless (-d $tmpdir and -r $tmpdir)
1274 2 0 if (defined $args{'dir'})
1279 0 2 unless (chdir $args{'dir'})
1287 2 0 if (defined $cwd)
1336 0 0 if (defined $$self{'symbols'}{$args{'symbol'}})
1383 0 0 if ($arg =~ /^(y|ye|yes|t|tr|tru|true|1)/i)