diff options
author | Norbert Preining <preining@logic.at> | 2010-11-11 00:25:35 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2010-11-11 00:25:35 +0000 |
commit | 3c7b4e420ea32033300d2426be57a41bd7f144f6 (patch) | |
tree | 92b19de52e1cc0a35c7f20fa5c493bcad4480d75 /Master/texmf/scripts | |
parent | cf0979efa1b7b3bbf368b9348e7cc2b35488cf40 (diff) |
only report backups once, not n+n times
git-svn-id: svn://tug.org/texlive/trunk@20400 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts')
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index a97dcc32c4d..fd5eddd1703 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -1510,20 +1510,17 @@ sub action_restore { my %revs = @_; my @rs = sort {$b <=> $a} (keys %revs); for my $rs (@rs) { - my @rs = sort {$b <=> $a} (keys %revs); - for my $rs (@rs) { - my $dstr; - if ($revs{$rs} == -1) { - $dstr = "unknown"; - } else { - my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = - localtime($revs{$rs}); - # localtime returns dates starting from 1900, and the month is 0..11 - $dstr = sprintf "%04d-%02d-%02d %02d:%02d", - $year+1900, $mon+1, $mday, $hour, $min; - } - print "$rs ($dstr) "; + my $dstr; + if ($revs{$rs} == -1) { + $dstr = "unknown"; + } else { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = + localtime($revs{$rs}); + # localtime returns dates starting from 1900, and the month is 0..11 + $dstr = sprintf "%04d-%02d-%02d %02d:%02d", + $year+1900, $mon+1, $mday, $hour, $min; } + print "$rs ($dstr) "; } } # end sub |