Hi,

On Thu, Dec 26, 2013 at 09:49:50AM -0800, Russ Allbery wrote:
> Csillag Tamas <csta...@digitus.itk.ppke.hu> writes:
> 
> > Russ: If you can update the regexp to cover these use case the better.
> > (and thanks for the current one, my Perl knowledge is lacking when it
> > comes to regexpes like this one :)
> 
> This change should do it:
... 
Thanks.

I attach the patch with the new regexp from Russ.
(git://cstamas.hu/git/devscripts.git has the rewritten commits)

> and then you can drop the replacement of newlines with spaces, and tabs
> should also be handled correctly.

I made a few tests and all looks good to me.

Regards,
 Tamas
-- 
CSILLAG Tamas (cstamas) - http://cstamas.hu/

"Not all those who wander are lost."  -- JRR Tolkien

commit 0c02627d977f1b13824bb6d93f03ada5517fe37a
Author: CSILLAG Tamas <csta...@cstamas.hu>
Date:   Thu Dec 26 18:04:51 2013 +0100

    file-excluded support escaped separators: newline, tab, space

diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index a3f4cb4..32d41de 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -1543,7 +1543,11 @@ EOF
 	    my $file_list;
 	    spawn(exec => ['find', $main_source_dir], wait_child => 1, to_string => \$file_list);
 	    my $nfiles_before = split /\n/, $file_list;
-	    foreach (grep { $_ } split /\s+/, $data->{"files-excluded"}) {
+	    # see the thread for details http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=635920#127
+	    my @excluded = ($data->{"files-excluded"} =~ /(?:\A|\G\s+)((?:\\.|[^\\\s])+)/g);
+	    # un-escape
+	    @excluded = map { s/\\(.)/$1/g; $_ } @excluded;
+	    foreach (@excluded) {
 		# delete trailing '/' because otherwise find -path will fail
 		s?/+$??;
 		# use rm -rf to enable deleting non-empty directories

Reply via email to