--- branches/no-pager/lib/Frey/Class/Refactor/Modify.pm 2008/12/08 19:24:53 751
+++ branches/no-pager/lib/Frey/Class/Refactor/Modify.pm 2008/12/08 19:27:55 752
@@ -47,6 +47,10 @@
$html .= qq|
|;
+ my $rename;
+ my $from_path = $self->from;
+ $from_path =~ s{::}{/}g;
+
foreach my $selected ( @{ $self->selected } ) {
warn "# selected ", $self->dump( $selected );
my $path = $self->path->[$selected] || die "no $selected path in ", $self->dump( $self->path );
@@ -59,6 +63,8 @@
my $from = $self->from;
my $to = $self->modification->[$selected];
+ $rename->{ $content_path } = $to if $content_path =~ m{$from_path};
+
$content[ $line ] =~ s{\Q$from\E}{$to}s;
$self->write_file( $content_path, @content );
@@ -67,6 +73,21 @@
$html .= qq|
|;
+ $html .= qq|
+
+ |;
+
+ foreach my $old ( keys %$rename ) {
+ my $to = $rename->{$old};
+ $to =~ s{::}{/}g;
+ my $new = $old;
+ $new =~ s{$from_path}{$to};
+ $html .= qq|svk mv $old $new\n
|;
+ }
+
$html;
}