[svk-devel] failure after renaming a mirrored path

Alan Barrett apb at cequrux.com
Tue Nov 7 05:06:28 EST 2006


On Tue, 07 Nov 2006, Alan Barrett wrote:
> I have a mirror in /mydepot/mirror/some-very-long-name.
> I want to rename it to a short name.  So I do this:
> 
>     svk mv /mydepot/mirror/some-very-long-name /mydepot/mirror/shortname
> 
> and then things go horribly wrong.
[...]
> The db/revs/${number} file looks as though it was trying to set the
> svm:mirror property, but the new value is identical to the old value.

The appended patch fixes that part of the problem, but even with the
patch, "svk mirror --list" doesn't like my mirror after the "svk mv"
command.

--apb (Alan Barrett)

=== lib/SVK/Command/Move.pm
==================================================================
--- lib/SVK/Command/Move.pm	(revision 24134)
+++ lib/SVK/Command/Move.pm	(local)
@@ -52,7 +52,7 @@
 	my $mstring = $src->root->node_prop('/', 'svm:mirror');
 	for (@{$self->{post_process_mirror}}) {
 	    my ($from, $to) = @$_;
-	    $mstring =~ s/^\Q$from\E$/$to/;
+	    $mstring =~ s/^\Q$from\E$/$to/m;
 	}
 	my $cmd = $self->command('propset', { revision => undef,
 					      message => 'svk: fix-up for mirror move' });


More information about the svk-devel mailing list