3 #==============================================================================
5 # File ID: 440141ba-5d44-11df-8e85-90e6ba3022ac
6 # Sorts the output from "cvs log" into chronological order.
7 # Made by Øyvind A. Holm <sunny@sunbase.org>
8 # License: GNU General Public License version 2 or later.
9 #==============================================================================
15 our ($opt_a, $opt_h) =
20 $opt_h && print_help
(0);
22 my ($curr_date, $curr_rev) = ("", "");
30 if ($Line =~ /^----------------------------$/) {
31 if (length($Rev) && scalar(@Curr)) {
32 $Entry{$Rev} = join("", @Curr);
37 if ($Line =~ /^revision (\S+)/) {
40 warn("Expected \"revision: \", got \"$Line\".\"");
44 if ($Line =~ /^date: (\S+\s+\S+) .*/) {
47 warn("Expected \"date: \", got \"$Line\".\"");
50 # $Rev = unpack("H*", "$curr_date$curr_rev");
51 $Rev = "$curr_date$curr_rev";
52 } elsif ($Line =~ /^=============================================================================$/ && !$opt_a) {
53 if (length($Rev) && scalar(@Curr)) {
54 $Entry{$Rev} = join("", @Curr);
57 while (my ($l_name, $l_val) = each %Entry) {
63 ($curr_date, $curr_rev, $Rev) = ("", "", "");
78 print("No help yet.\n");
86 This program is free software; you can redistribute it and/or modify it
87 under the terms of the GNU General Public License as published by the
88 Free Software Foundation; either version 2 of the License, or (at your
89 option) any later version.
91 This program is distributed in the hope that it will be useful, but
92 WITHOUT ANY WARRANTY; without even the implied warranty of
93 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
94 See the GNU General Public License for more details.
96 You should have received a copy of the GNU General Public License along
97 with this program; if not, write to the Free Software Foundation, Inc.,
98 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA