aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/rcs2log
diff options
context:
space:
mode:
authorPaul Eggert2002-02-03 17:31:31 +0000
committerPaul Eggert2002-02-03 17:31:31 +0000
commitb2ba2352ed22d72a7dcd7b7be95d5afca2d5129f (patch)
tree6460f4aaaf40f4d8ab250b3881b46d2372178812 /lib-src/rcs2log
parente1ff49ba1e519ab727c85c9d810768a5f0aebfb0 (diff)
downloademacs-b2ba2352ed22d72a7dcd7b7be95d5afca2d5129f.tar.gz
emacs-b2ba2352ed22d72a7dcd7b7be95d5afca2d5129f.zip
(Copyright): Update to 2002.
(AWK, TMPDIR): Work around portability problem in broken shells that don't understand `: ${VAR=val}'. (SORT_K_OPTIONS): New var, for hosts that conform to POSIX 1003.1-2001. Prefer the new -k option to the traditional +M -N option.
Diffstat (limited to 'lib-src/rcs2log')
-rwxr-xr-xlib-src/rcs2log18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib-src/rcs2log b/lib-src/rcs2log
index d1da3a07613..a304df9adbd 100755
--- a/lib-src/rcs2log
+++ b/lib-src/rcs2log
@@ -29,9 +29,9 @@ Options:
29 29
30Report bugs to <bug-gnu-emacs@gnu.org>.' 30Report bugs to <bug-gnu-emacs@gnu.org>.'
31 31
32Id='$Id: rcs2log,v 1.48 2001/09/05 23:07:46 eggert Exp $' 32Id='$Id: rcs2log,v 1.49 2001/11/28 23:55:08 eggert Exp eggert $'
33 33
34# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001 34# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002
35# Free Software Foundation, Inc. 35# Free Software Foundation, Inc.
36 36
37# This program is free software; you can redistribute it and/or modify 37# This program is free software; you can redistribute it and/or modify
@@ -49,7 +49,7 @@ Id='$Id: rcs2log,v 1.48 2001/09/05 23:07:46 eggert Exp $'
49# Free Software Foundation, Inc., 59 Temple Place - Suite 330, 49# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
50# Boston, MA 02111-1307, USA. 50# Boston, MA 02111-1307, USA.
51 51
52Copyright='Copyright (C) 2001 Free Software Foundation, Inc. 52Copyright='Copyright (C) 2002 Free Software Foundation, Inc.
53This program comes with NO WARRANTY, to the extent permitted by law. 53This program comes with NO WARRANTY, to the extent permitted by law.
54You may redistribute copies of this program 54You may redistribute copies of this program
55under the terms of the GNU General Public License. 55under the terms of the GNU General Public License.
@@ -79,8 +79,8 @@ nl='
79# Parse options. 79# Parse options.
80 80
81# defaults 81# defaults
82: ${AWK=awk} 82AWK=${AWK-awk}
83: ${TMPDIR=/tmp} 83TMPDIR=${TMPDIR-/tmp}
84changelog=ChangeLog # change log file name 84changelog=ChangeLog # change log file name
85datearg= # rlog date option 85datearg= # rlog date option
86hostname= # name of local host (if empty, will deduce it later) 86hostname= # name of local host (if empty, will deduce it later)
@@ -354,6 +354,12 @@ case $rlogfile in
354esac 354esac
355 355
356 356
357# Prefer the POSIX-style -k options, since POSIX 1003.1-2001 prohibits
358# support for the traditional-style +M -N options.
359SORT_K_OPTIONS='-k 3,4r -k 5 -k 1'
360sort $SORT_K_OPTIONS </dev/null 2>/dev/null || SORT_K_OPTIONS='+2 -4r +4 +0'
361
362
357# Get the full name of each author the logs mention, and set initialize_fullname 363# Get the full name of each author the logs mention, and set initialize_fullname
358# to awk code that initializes the `fullname' awk associative array. 364# to awk code that initializes the `fullname' awk associative array.
359# Warning: foreign authors (i.e. not known in the passwd file) are mishandled; 365# Warning: foreign authors (i.e. not known in the passwd file) are mishandled;
@@ -615,7 +621,7 @@ $AWK '
615# Sort the log entries, first by date+time (in reverse order), 621# Sort the log entries, first by date+time (in reverse order),
616# then by author, then by log entry, and finally by file name and revision 622# then by author, then by log entry, and finally by file name and revision
617# (just in case). 623# (just in case).
618sort -t"$SOH" +2 -4r +4 +0 | 624sort -t"$SOH" $SORT_K_OPTIONS |
619 625
620# Finally, reformat the sorted log entries. 626# Finally, reformat the sorted log entries.
621$AWK -F"$SOH" ' 627$AWK -F"$SOH" '