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