Whitespace.
authoridl0r <idl0r@gentoo.org>
Sat, 2 May 2009 13:51:12 +0000 (13:51 -0000)
committeridl0r <idl0r@gentoo.org>
Sat, 2 May 2009 13:51:12 +0000 (13:51 -0000)
svn path=/; revision=576

trunk/src/echangelog/echangelog

index 66007fa5d8811f20c438c334df0f57d90ef2506a..7a7cbf4e3aec84076748e202121fbb7805d9cbd5 100755 (executable)
@@ -80,12 +80,12 @@ sub getenv($) {
     my $key = shift;
 
     # Ensure our variable exist
-    if ( defined($ENV{$key}) ) { 
+    if ( defined($ENV{$key}) ) {
         # Ensure we don't get empty variables
-        if ( length($ENV{$key}) > 0 ) { 
+        if ( length($ENV{$key}) > 0 ) {
             return $ENV{$key};
-        }   
-    }   
+        }
+    }
     return undef;
 }
 
@@ -156,7 +156,7 @@ if (-f 'ChangeLog') {
                close C;
 
                $new =~ s/\s+$//;
-               open I, "< $new/skel.ChangeLog" 
+               open I, "< $new/skel.ChangeLog"
                        or die "Can't open $new/skel.ChangeLog for input: $!\n";
                { local $/ = undef; $text = <I>; }
                close I;
@@ -181,7 +181,7 @@ while (<C>) {
                        push @conflicts, $1;
                        next;
                }
-               
+
                push @conflicts, $1;
                next;
        } elsif (/^\?\s+(\S+)/) {
@@ -198,18 +198,18 @@ while (<C>) {
                } else {
                        push @unknown, $1;
                }
-               
+
                $actions{$1} = '+';
                next;
        } elsif (/^([ARMD])\s+\+?\s*(\S+)/) {
                my ($status, $filename) = ($1,$2);
-               
+
                if($vcs eq "git") {
                        open P, "git rev-parse --sq --show-prefix |";
                        my $prefix = <P>;
                        $prefix = substr($prefix, 0, -1);
                        close P;
-                       
+
                        if ($filename =~ /$prefix(\S*)/) {
                                $filename = $1 ;
                        }
@@ -217,11 +217,11 @@ while (<C>) {
                                next;
                        }
                }
-               
+
                if( -d $filename ) {
                        next;
                }
-               
+
                push @files, $filename;
                ($actions{$filename} = $status) =~ tr/DARM/-+-/d;
        }
@@ -240,12 +240,12 @@ sub git_unknown_objects {
        # Ignore empty directories - git doesn't version them and cvs removes them.
        if ( (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && ! -d _ ) {
                open C, $vcs." status $_ 2>&1 1>/dev/null |";
-               
+
                while (<C>) {
                        $_ = <C>;
                        push @unknown, $object;
                };
-       
+
                close C;
        };
 }
@@ -342,7 +342,7 @@ sub sortfunc($$) {
                # compare suffix number
                return +5 if defined $sna and !defined $snb;
                return -5 if defined $snb and !defined $sna;
-               
+
                if (defined $sna) {  # and defined $snb
                        $retval = ($sna <=> $snb);
                        return $retval if $retval;
@@ -354,7 +354,7 @@ sub sortfunc($$) {
        #
        return +6 if defined $ra and !defined $rb;
        return -6 if defined $rb and !defined $ra;
-       
+
        if (defined $ra) { # and defined $rb
                return ($ra <=> $rb);
        }
@@ -401,7 +401,7 @@ if (@ebuilds) {
 
                        if ($vcs eq "git") {
                                my $version = $2;
-                               
+
                                while (<C>) {
                                        last if /^deleted file mode|^index/;
                                        if (/^new file mode/) {
@@ -451,7 +451,7 @@ if (($vcs eq "svn") and (@ebuilds)) {
                        mypush(@files, $1);
                        mypush(@new_versions, $2);
                }
-               
+
                $_ = <C>;
        }
 }
@@ -519,7 +519,7 @@ if ($ARGV[0]) {
                        unlink('ChangeLog.new') if -f 'ChangeLog.new';
                }
        }
-       
+
        unless ($editor) {
                print "Please type the log entry: use Ctrl-d to finish, Ctrl-c to abort...\n";
                local $/ = undef;
@@ -572,7 +572,7 @@ $entry .= "\n$input";                          # append user input
 if (@new_versions) {
        # Insert at the top with a new version marker
        $text =~ s/^( .*? )               # grab header
-       \s*\n(?=\ \ \d|\*|\z)  # suck up trailing whitespace
+               \s*\n(?=\ \ \d|\*|\z)  # suck up trailing whitespace
                /"$1\n\n" .
                join("\n", map "*$_ ($date)", reverse @new_versions) .
                "\n\n$entry\n\n"/sxe