Michael W Thelen wrote:
> Thank you for the patch! It looks like the original code was probably
> intending to make the space optional, but wrongly used \s+? instead of
> \s*. Since the $morespacing variable is never used in your patch,
> there's really no need to capture it. Something like the patch below
> might be cleaner. Unfortunately I can't test it at the moment. Would
> someone be willing to try it out and either approve or commit it?
I did get around to testing this patch after tweaking it again slightly,
and it works as expected. If no one objects, I'll go ahead and commit it.
[[[
Fix svncopy.pl to handle externals pinned with -rX instead of -r X.
* contrib/client-side/svncopy.pl.in
(UpdateExternalsOnDir): Change the external-matching regular
expression so it matches revisions specified as "-rX".
Patch by: Jacob Atzen <jacob@aub.dk>
(Tweaked by me.)
]]]
--
Michael W Thelen
It is a mistake to think you can solve any major problems just with
potatoes. -- Douglas Adams
Index: contrib/client-side/svncopy.pl.in
===================================================================
--- contrib/client-side/svncopy.pl.in (revision 19401)
+++ contrib/client-side/svncopy.pl.in (working copy)
@@ -445,8 +445,8 @@
foreach my $external ( @externals )
{
chomp( $external );
- next unless ( $external =~ m"^(\S+)(\s+)(-r\s+?(\d+)\s+)?(.*)" );
- my ( $ext_dir, $spacing, $revstr, $ext_rev, $ext_val ) = ( $1, $2, $3, $4, $5 );
+ next unless ( $external =~ m"^(\S+)(\s+)(?:-r\s*(\d+)\s+)?(.*)" );
+ my ( $ext_dir, $spacing, $ext_rev, $ext_val ) = ( $1, $2, $3, $4 );
info( " - Found $ext_dir => '$ext_val'" );
info( " ($ext_rev)" ) if $ext_rev;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 18 01:42:16 2006