[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] svncopy.pl externals tag fix

From: Michael W Thelen <mike_at_pietdepsi.com>
Date: 2006-04-11 01:38:56 CEST

Jacob Atzen wrote:
> [[[
> Fix svncopy.pl to handle externals pinned with -rX instead of -r X
>
> * contrib/client-side/svncopy.pl.in
> (UpdateExternalsOnDir) Change regexp to handle alternate revision
> format for externals in the source
> ]]]

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?

Index: contrib/client-side/svncopy.pl.in
===================================================================
--- contrib/client-side/svncopy.pl.in (revision 19303)
+++ contrib/client-side/svncopy.pl.in (working copy)
@@ -445,7 +445,7 @@
   foreach my $external ( @externals )
     {
       chomp( $external );
- next unless ( $external =~ m"^(\S+)(\s+)(-r\s+?(\d+)\s+)?(.*)" );
+ next unless ( $external =~ m"^(\S+)(\s+)(-r\s*(\d+)\s+)?(.*)" );
       my ( $ext_dir, $spacing, $revstr, $ext_rev, $ext_val ) = ( $1,
$2, $3, $4, $5 );

       info( " - Found $ext_dir => '$ext_val'" );

-- 
Michael W Thelen
It is a mistake to think you can solve any major problems just with
potatoes.       -- Douglas Adams
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 11 01:45:18 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.