aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoridl0r <idl0r@gentoo.org>2009-05-02 13:51:12 +0000
committeridl0r <idl0r@gentoo.org>2009-05-02 13:51:12 +0000
commitb48eaf5dc0e1da38888d7f86c1c0efe7df44c01c (patch)
treed79e7efdb97230df505fbd35ee1a5cfc4536919c
parentFixed text_fill, \h is just available in perl >= 5.10 so use hex instead, tha... (diff)
downloadgentoolkit-b48eaf5dc0e1da38888d7f86c1c0efe7df44c01c.tar.gz
gentoolkit-b48eaf5dc0e1da38888d7f86c1c0efe7df44c01c.tar.bz2
gentoolkit-b48eaf5dc0e1da38888d7f86c1c0efe7df44c01c.zip
Whitespace.
svn path=/; revision=576
-rwxr-xr-xtrunk/src/echangelog/echangelog38
1 files 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 = <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