more idiomatic perl
parent
2a15f94159
commit
c9af069b59
|
@ -83,15 +83,13 @@ sub bzr_log ($) {
|
||||||
}
|
}
|
||||||
elsif ($line =~ /^(modified|added|renamed|renamed and modified|removed):/) {
|
elsif ($line =~ /^(modified|added|renamed|renamed and modified|removed):/) {
|
||||||
$key = "files";
|
$key = "files";
|
||||||
unless (defined($info{$key})) { $info{$key} = ""; }
|
$info{$key} = "" unless defined $info{$key};
|
||||||
}
|
}
|
||||||
elsif (defined($key) and $line =~ /^ (.*)/) {
|
elsif (defined($key) and $line =~ /^ (.*)/) {
|
||||||
$info{$key} .= "$1\n";
|
$info{$key} .= "$1\n";
|
||||||
}
|
}
|
||||||
elsif ($line eq "------------------------------------------------------------\n") {
|
elsif ($line eq "------------------------------------------------------------\n") {
|
||||||
if (keys %info) {
|
push @infos, {%info} if keys %info;
|
||||||
push (@infos, {%info});
|
|
||||||
}
|
|
||||||
%info = ();
|
%info = ();
|
||||||
$key = undef;
|
$key = undef;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue