[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-18 01:35:36 CEST

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

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.