31 |
|
|
32 |
Id='$Id$' |
Id='$Id$' |
33 |
|
|
34 |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001 |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002 |
35 |
# Free Software Foundation, Inc. |
# Free Software Foundation, Inc. |
36 |
|
|
37 |
# This program is free software; you can redistribute it and/or modify |
# This program is free software; you can redistribute it and/or modify |
49 |
# Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
# Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
50 |
# Boston, MA 02111-1307, USA. |
# Boston, MA 02111-1307, USA. |
51 |
|
|
52 |
Copyright='Copyright (C) 2001 Free Software Foundation, Inc. |
Copyright='Copyright (C) 2002 Free Software Foundation, Inc. |
53 |
This program comes with NO WARRANTY, to the extent permitted by law. |
This program comes with NO WARRANTY, to the extent permitted by law. |
54 |
You may redistribute copies of this program |
You may redistribute copies of this program |
55 |
under the terms of the GNU General Public License. |
under the terms of the GNU General Public License. |
79 |
# Parse options. |
# Parse options. |
80 |
|
|
81 |
# defaults |
# defaults |
82 |
: ${AWK=awk} |
AWK=${AWK-awk} |
83 |
: ${TMPDIR=/tmp} |
TMPDIR=${TMPDIR-/tmp} |
84 |
changelog=ChangeLog # change log file name |
changelog=ChangeLog # change log file name |
85 |
datearg= # rlog date option |
datearg= # rlog date option |
86 |
hostname= # name of local host (if empty, will deduce it later) |
hostname= # name of local host (if empty, will deduce it later) |
354 |
esac |
esac |
355 |
|
|
356 |
|
|
357 |
|
# Prefer the POSIX-style -k options, since POSIX 1003.1-2001 prohibits |
358 |
|
# support for the traditional-style +M -N options. |
359 |
|
SORT_K_OPTIONS='-k 3,4r -k 5 -k 1' |
360 |
|
sort $SORT_K_OPTIONS </dev/null 2>/dev/null || SORT_K_OPTIONS='+2 -4r +4 +0' |
361 |
|
|
362 |
|
|
363 |
# Get the full name of each author the logs mention, and set initialize_fullname |
# Get the full name of each author the logs mention, and set initialize_fullname |
364 |
# to awk code that initializes the `fullname' awk associative array. |
# to awk code that initializes the `fullname' awk associative array. |
365 |
# Warning: foreign authors (i.e. not known in the passwd file) are mishandled; |
# Warning: foreign authors (i.e. not known in the passwd file) are mishandled; |
621 |
# Sort the log entries, first by date+time (in reverse order), |
# Sort the log entries, first by date+time (in reverse order), |
622 |
# then by author, then by log entry, and finally by file name and revision |
# then by author, then by log entry, and finally by file name and revision |
623 |
# (just in case). |
# (just in case). |
624 |
sort -t"$SOH" +2 -4r +4 +0 | |
sort -t"$SOH" $SORT_K_OPTIONS | |
625 |
|
|
626 |
# Finally, reformat the sorted log entries. |
# Finally, reformat the sorted log entries. |
627 |
$AWK -F"$SOH" ' |
$AWK -F"$SOH" ' |