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

[PATCH] Fix in Client Side Contrib Tool: svn-clean

From: Jaap DeHaan <Jaap.DeHaan_at_alpine-research.de>
Date: Wed, 9 Jan 2008 09:33:08 +0100

This patch fixes two small issues in one svn contribution: svn-clean perl
script.
1- A problem with array initialization
2- A bigger issue concerning the processing of files and directories with
whitespaces in their names.
Hope you like it :-)

[[[
* contrib/client-side/svn-clean:
    - J. de Haan: Fixed array initialization
    - J. de Haan: Fixed bug on processing files and directories with
whitespaces in name
]]]

------------ BEGIN
Index: svn-clean
===================================================================
--- svn-clean (revision 28581)
+++ svn-clean (working copy)
@@ -28,7 +28,7 @@
 
 my $CWD = getcwd;
 
-my @exclude = "";
+my @exclude = ();
 my $force = 0;
 my $quiet = 0;
 my $print = 0;
@@ -83,7 +83,9 @@
     }
   LINE: while (<SVN>) {
         if (/^([\?ID])/) {
- my $file = (split)[-1];
+ chomp;
+ my $file = $_;
+ $file =~ s!\?\s*!!;
             foreach my $ex (@exclude) {
                 if ( $file =~ $ex ) {
                     print "excluded $file\n" unless $quiet or $print;
------------ END

Best Regards,

  Jaap de Haan
  Software Quality Assurance Engineer
  QM Group
______________________________________________________________________

  Alpine Electronics R&D Europe GmbH, Vor dem Lauch 14, 70567 Stuttgart
  Geschäftsführer: Hitoshi Kajiwara, Masana Minami, Satoshi Soma, Kazuo
Nakamura, Shigehiro Inoue, Katsumi Miyake
  Registergericht: Amtsgericht Stuttgart, Handelsregisternummer: 25265
  St.-Nr.: 99031/23688, USt-ID-Nr: DE 814380762

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-01-09 09:33:21 CET

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.