[devscripts] 04/07: uscan: drop leading \s if version 4

Osamu Aoki osamu at moszumanska.debian.org
Thu Oct 1 14:13:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

osamu pushed a commit to branch multitar
in repository devscripts.

commit 5f710420e8461cb10f3cbd753f2485a5f44db76d
Author: Osamu Aoki <osamu at debian.org>
Date:   Thu Oct 1 13:26:51 2015 +0000

    uscan: drop leading \s if version 4
    
    Drop \s only for version=4 to be safe
---
 scripts/uscan.pl | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index ce075e9..ed1d8d5 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -3476,6 +3476,7 @@ sub process_watchfile ($$$$)
     my ($dir, $package, $version, $watchfile) = @_;
     my $watch_version=0;
     my $status=0;
+    my $nextline;
     %dehs_tags = ();
 
     unless (open WATCH, $watchfile) {
@@ -3496,7 +3497,14 @@ sub process_watchfile ($$$$)
 		$status=1;
 		last;
 	    }
-	    $_ .= <WATCH>;
+	    if ($watch_version > 3) {
+	        # drop leading \s only if version 4
+		$nextline = <WATCH>;
+		$nextline =~ s/^\s*//;
+		$_ .= $nextline;
+	    } else {
+		$_ .= <WATCH>;
+	    }
 	    goto CHOMP;
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list