| 1 | package Module::Setup::Plugin::VC::SVK; | ||||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 1 | ▶ | use base 'Module::Setup::Plugin::VC::SVN'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 1 | ▶ | use Path::Class; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | sub register { | ||||||||||||
| 9 | 7 | ▶ | my($self, ) = @_; | ||||||||||
|
Subroutine
register: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 10 | 7 | $self->add_trigger( before_dump_config => \&before_dump_config ); | |||||||||||
| 11 | 7 | ▶ | $self->add_trigger( after_setup_module_attribute => sub { shift->SUPER::after_setup_module_attribute(@_) } ); | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 12 | 7 | $self->add_trigger( finish_of_run => \&finish_of_run ); | |||||||||||
| 13 | } | ||||||||||||
| 14 | |||||||||||||
| 15 | sub before_dump_config { | ||||||||||||
| 16 | 2 | ▶ | my($self, $config) = @_; | ||||||||||
|
Subroutine
before_dump_config: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 17 | |||||||||||||
| 18 | 2 | ▶ | $config->{plugin_vc_svk_scratch_repos} ||= '//scratch'; | ||||||||||
|
Condition100%2/2
$config->{"plugin_vc_svk_scratch_repos"} ||= "//scratch"
MC/DC100%1/1
$config->{"plugin_vc_svk_scratch_repos"} ||= "//scratch"
$config->{"plugin_vc_svk_scratch_repos"}
Truth table100%2/2
A
A= $config->{"plugin_vc_svk_scratch_repos"}
| |||||||||||||
| 19 | $config->{plugin_vc_svk_scratch_repos} = | ||||||||||||
| 20 | 2 | $self->dialog("Your svk base scratch DEPOTPATH: ", $config->{plugin_vc_svk_scratch_repos}); | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | sub finish_of_run { | ||||||||||||
| 24 | 5 | ▶ | my $self = shift; | ||||||||||
|
Subroutine
finish_of_run: called CC=5 SCAR=16.1
Pod
documented
| |||||||||||||
| 25 | 5 | ▶ | return unless $self->dialog("import to SVK scratch DEPOTPATH? [yN] ", 'n') =~ /[Yy]/; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 26 | |||||||||||||
| 27 | !$self->system( | ||||||||||||
| 28 | 'svk', 'import', | ||||||||||||
| 29 | '-m', $self->distribute->dist_name . ' import', | ||||||||||||
| 30 | 4 | ▶ | $self->config->{plugin_vc_svk_scratch_repos} . '/' . $self->distribute->dist_name, | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 31 | '--from-checkout', $self->distribute->base_path, | ||||||||||||
| 32 | ) or die $?; | ||||||||||||
| 33 | |||||||||||||
| 34 | 3 | $self->distribute->base_path->rmtree; | |||||||||||
| 35 | |||||||||||||
| 36 | 3 | ▶ | my $trunk_path = $self->plugins_stash->{'VC::SVN'}->{is_subversion_friendly} ? '/trunk' : ''; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 37 | !$self->system( | ||||||||||||
| 38 | 'svk', 'co', | ||||||||||||
| 39 | 3 | ▶ | $self->config->{plugin_vc_svk_scratch_repos} . '/' . $self->distribute->dist_name . $trunk_path, | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 40 | $self->distribute->dist_name, | ||||||||||||
| 41 | ) or die $?; | ||||||||||||
| 42 | } | ||||||||||||
| 43 | |||||||||||||
| 44 | 1 | 1; | |||||||||||