aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/rcs2log
diff options
context:
space:
mode:
authorPaul Eggert1992-03-21 05:58:05 +0000
committerPaul Eggert1992-03-21 05:58:05 +0000
commitb19075d18e4f0af0f5abe13af66eff4e3ee958f2 (patch)
tree96c70b33e17097265b690696cb2d3d3e17f9d915 /lib-src/rcs2log
parentb9706ae4953c7e01ee1ada04a734247b9f0b1c21 (diff)
downloademacs-b19075d18e4f0af0f5abe13af66eff4e3ee958f2.tar.gz
emacs-b19075d18e4f0af0f5abe13af66eff4e3ee958f2.zip
Add clumpname support.
Diffstat (limited to 'lib-src/rcs2log')
-rwxr-xr-xlib-src/rcs2log34
1 files changed, 27 insertions, 7 deletions
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 @@
2 2
3# RCS to ChangeLog generator 3# RCS to ChangeLog generator
4 4
5# $Id: rcs2clog,v 1.2 1992/02/05 04:31:18 eggert Exp eggert $ 5# $Id: rcs2clog,v 1.3 1992/02/05 17:25:10 eggert Exp eggert $
6 6
7# Generate a change log prefix from RCS/* and the existing ChangeLog (if any). 7# Generate a change log prefix from RCS/* and the existing ChangeLog (if any).
8# Output the new prefix to standard output. 8# Output the new prefix to standard output.
@@ -91,7 +91,7 @@ done
91# Function to print a single log line. 91# Function to print a single log line.
92# We don't use awk functions, to stay compatible with old awk versions. 92# We don't use awk functions, to stay compatible with old awk versions.
93# `Log' is the log message (with \n replaced by \r). 93# `Log' is the log message (with \n replaced by \r).
94# `files' contains the affected files (each preceded by a space). 94# `files' contains the affected files.
95printlogline='{ 95printlogline='{
96 96
97 # Following the GNU coding standards, rewrite 97 # Following the GNU coding standards, rewrite
@@ -117,8 +117,6 @@ printlogline='{
117 sep = indent_string 117 sep = indent_string
118 Log = substr(Log, i+1) 118 Log = substr(Log, i+1)
119 } 119 }
120
121 printf "\n"
122}' 120}'
123 121
124hostname=`( 122hostname=`(
@@ -198,10 +196,28 @@ awk '
198 { 196 {
199 newlog = substr($0, 1 + index($0, "\r")) 197 newlog = substr($0, 1 + index($0, "\r"))
200 if (Log != newlog || date != $2 || author != $4) { 198 if (Log != newlog || date != $2 || author != $4) {
199
201 # The previous log and this log differ. 200 # The previous log and this log differ.
202 # Print the old one. 201
202 # Print the old log.
203 if (date != "") '"$printlogline"' 203 if (date != "") '"$printlogline"'
204 204
205 # Logs that begin with "{clumpname} " should be grouped together,
206 # and the clumpname should be removed.
207 # Extract the new clumpname from the log header,
208 # and use it to decide whether to output a blank line.
209 newclumpname = ""
210 sep = "\n"
211 if (newlog ~ /^{[^ }]+}[ ]/) {
212 i = index(newlog, "}")
213 newclumpname = substr(newlog, 1, i)
214 while (substr(newlog, i+1) ~ /^[ ]/) i++
215 newlog = substr(newlog, i+1)
216 if (clumpname == newclumpname) sep = ""
217 }
218 printf sep
219 clumpname = newclumpname
220
205 # Get ready for the next log. 221 # Get ready for the next log.
206 Log = newlog 222 Log = newlog
207 if (files != "") 223 if (files != "")
@@ -240,12 +256,16 @@ awk '
240 } 256 }
241 if (! filesknown[$1]) { 257 if (! filesknown[$1]) {
242 filesknown[$1] = 1 258 filesknown[$1] = 1
243 files = files " " $1 259 if (files == "") files = " " $1
260 else files = files ", " $1
244 } 261 }
245 } 262 }
246 END { 263 END {
247 # Print the last log. 264 # Print the last log.
248 if (date != "") '"$printlogline"' 265 if (date != "") {
266 '"$printlogline"'
267 printf "\n"
268 }
249 } 269 }
250' && 270' &&
251 271