From b48eaf5dc0e1da38888d7f86c1c0efe7df44c01c Mon Sep 17 00:00:00 2001 From: idl0r Date: Sat, 2 May 2009 13:51:12 +0000 Subject: [PATCH] Whitespace. svn path=/; revision=576 --- trunk/src/echangelog/echangelog | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/trunk/src/echangelog/echangelog b/trunk/src/echangelog/echangelog index 66007fa..7a7cbf4 100755 --- a/trunk/src/echangelog/echangelog +++ b/trunk/src/echangelog/echangelog @@ -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 = ; } close I; @@ -181,7 +181,7 @@ while () { push @conflicts, $1; next; } - + push @conflicts, $1; next; } elsif (/^\?\s+(\S+)/) { @@ -198,18 +198,18 @@ while () { } 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 =

; $prefix = substr($prefix, 0, -1); close P; - + if ($filename =~ /$prefix(\S*)/) { $filename = $1 ; } @@ -217,11 +217,11 @@ while () { 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 () { $_ = ; 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 () { 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); } - + $_ = ; } } @@ -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 -- 2.26.2