47 |
|
|
48 |
$html .= qq|<ul>|; |
$html .= qq|<ul>|; |
49 |
|
|
50 |
|
my $rename; |
51 |
|
my $from_path = $self->from; |
52 |
|
$from_path =~ s{::}{/}g; |
53 |
|
|
54 |
foreach my $selected ( @{ $self->selected } ) { |
foreach my $selected ( @{ $self->selected } ) { |
55 |
warn "# selected ", $self->dump( $selected ); |
warn "# selected ", $self->dump( $selected ); |
56 |
my $path = $self->path->[$selected] || die "no $selected path in ", $self->dump( $self->path ); |
my $path = $self->path->[$selected] || die "no $selected path in ", $self->dump( $self->path ); |
63 |
my $from = $self->from; |
my $from = $self->from; |
64 |
my $to = $self->modification->[$selected]; |
my $to = $self->modification->[$selected]; |
65 |
|
|
66 |
|
$rename->{ $content_path } = $to if $content_path =~ m{$from_path}; |
67 |
|
|
68 |
$content[ $line ] =~ s{\Q$from\E}{$to}s; |
$content[ $line ] =~ s{\Q$from\E}{$to}s; |
69 |
$self->write_file( $content_path, @content ); |
$self->write_file( $content_path, @content ); |
70 |
|
|
73 |
|
|
74 |
$html .= qq|</ul>|; |
$html .= qq|</ul>|; |
75 |
|
|
76 |
|
$html .= qq| |
77 |
|
<div class="frey-notice"> |
78 |
|
<a target="Frey::SVK" href="/Frey::SVK/as_markup">Verify and commit changes</a> |
79 |
|
and execute following commands to rename classes in file system: |
80 |
|
</div> |
81 |
|
|; |
82 |
|
|
83 |
|
foreach my $old ( keys %$rename ) { |
84 |
|
my $to = $rename->{$old}; |
85 |
|
$to =~ s{::}{/}g; |
86 |
|
my $new = $old; |
87 |
|
$new =~ s{$from_path}{$to}; |
88 |
|
$html .= qq|<pre>svk mv $old $new\n</pre>|; |
89 |
|
} |
90 |
|
|
91 |
$html; |
$html; |
92 |
} |
} |
93 |
|
|