diff options
author | Paul Eggert <eggert@twinsun.com> | 1992-03-21 05:58:05 +0000 |
---|---|---|
committer | Paul Eggert <eggert@twinsun.com> | 1992-03-21 05:58:05 +0000 |
commit | 0a71e6e84f02de62a9816d9625fc9f98762e2117 (patch) | |
tree | 31139c223c9c7a87afbfedf8d18c19227d4bf32f /lib-src | |
parent | 3d50ae3cd82cff149654b43c3e5f8352e1bf0eff (diff) | |
download | emacs-0a71e6e84f02de62a9816d9625fc9f98762e2117.tar.gz |
Add clumpname support.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/=rcs2log | 34 | ||||
-rwxr-xr-x | lib-src/rcs2log | 34 |
2 files changed, 54 insertions, 14 deletions
diff --git a/lib-src/=rcs2log b/lib-src/=rcs2log index 279e78069fa..22b2157e6ad 100644 --- a/lib-src/=rcs2log +++ b/lib-src/=rcs2log @@ -2,7 +2,7 @@ # RCS to ChangeLog generator -# $Id: rcs2clog,v 1.2 1992/02/05 04:31:18 eggert Exp eggert $ +# $Id: rcs2clog,v 1.3 1992/02/05 17:25:10 eggert Exp eggert $ # Generate a change log prefix from RCS/* and the existing ChangeLog (if any). # Output the new prefix to standard output. @@ -91,7 +91,7 @@ done # Function to print a single log line. # We don't use awk functions, to stay compatible with old awk versions. # `Log' is the log message (with \n replaced by \r). -# `files' contains the affected files (each preceded by a space). +# `files' contains the affected files. printlogline='{ # Following the GNU coding standards, rewrite @@ -117,8 +117,6 @@ printlogline='{ sep = indent_string Log = substr(Log, i+1) } - - printf "\n" }' hostname=`( @@ -198,10 +196,28 @@ awk ' { newlog = substr($0, 1 + index($0, "\r")) if (Log != newlog || date != $2 || author != $4) { + # The previous log and this log differ. - # Print the old one. + + # Print the old log. if (date != "") '"$printlogline"' + # Logs that begin with "{clumpname} " should be grouped together, + # and the clumpname should be removed. + # Extract the new clumpname from the log header, + # and use it to decide whether to output a blank line. + newclumpname = "" + sep = "\n" + if (newlog ~ /^{[^ }]+}[ ]/) { + i = index(newlog, "}") + newclumpname = substr(newlog, 1, i) + while (substr(newlog, i+1) ~ /^[ ]/) i++ + newlog = substr(newlog, i+1) + if (clumpname == newclumpname) sep = "" + } + printf sep + clumpname = newclumpname + # Get ready for the next log. Log = newlog if (files != "") @@ -240,12 +256,16 @@ awk ' } if (! filesknown[$1]) { filesknown[$1] = 1 - files = files " " $1 + if (files == "") files = " " $1 + else files = files ", " $1 } } END { # Print the last log. - if (date != "") '"$printlogline"' + if (date != "") { + '"$printlogline"' + printf "\n" + } } ' && diff --git a/lib-src/rcs2log b/lib-src/rcs2log index 279e78069fa..22b2157e6ad 100755 --- a/lib-src/rcs2log +++ b/lib-src/rcs2log @@ -2,7 +2,7 @@ # RCS to ChangeLog generator -# $Id: rcs2clog,v 1.2 1992/02/05 04:31:18 eggert Exp eggert $ +# $Id: rcs2clog,v 1.3 1992/02/05 17:25:10 eggert Exp eggert $ # Generate a change log prefix from RCS/* and the existing ChangeLog (if any). # Output the new prefix to standard output. @@ -91,7 +91,7 @@ done # Function to print a single log line. # We don't use awk functions, to stay compatible with old awk versions. # `Log' is the log message (with \n replaced by \r). -# `files' contains the affected files (each preceded by a space). +# `files' contains the affected files. printlogline='{ # Following the GNU coding standards, rewrite @@ -117,8 +117,6 @@ printlogline='{ sep = indent_string Log = substr(Log, i+1) } - - printf "\n" }' hostname=`( @@ -198,10 +196,28 @@ awk ' { newlog = substr($0, 1 + index($0, "\r")) if (Log != newlog || date != $2 || author != $4) { + # The previous log and this log differ. - # Print the old one. + + # Print the old log. if (date != "") '"$printlogline"' + # Logs that begin with "{clumpname} " should be grouped together, + # and the clumpname should be removed. + # Extract the new clumpname from the log header, + # and use it to decide whether to output a blank line. + newclumpname = "" + sep = "\n" + if (newlog ~ /^{[^ }]+}[ ]/) { + i = index(newlog, "}") + newclumpname = substr(newlog, 1, i) + while (substr(newlog, i+1) ~ /^[ ]/) i++ + newlog = substr(newlog, i+1) + if (clumpname == newclumpname) sep = "" + } + printf sep + clumpname = newclumpname + # Get ready for the next log. Log = newlog if (files != "") @@ -240,12 +256,16 @@ awk ' } if (! filesknown[$1]) { filesknown[$1] = 1 - files = files " " $1 + if (files == "") files = " " $1 + else files = files ", " $1 } } END { # Print the last log. - if (date != "") '"$printlogline"' + if (date != "") { + '"$printlogline"' + printf "\n" + } } ' && |