# HG changeset patch # User Paul Eggert # Date 867286803 0 # Node ID 44e598b69b42e94ac18c8ed818a8aa76def3e4cf # Parent 8eb08560287b7cac932672a3d6e3894f32439cf7 Don't assign to $0 in awk; some awks don't allow this. diff -r 8eb08560287b -r 44e598b69b42 lib-src/rcs2log --- a/lib-src/rcs2log Wed Jun 25 15:30:27 1997 +0000 +++ b/lib-src/rcs2log Thu Jun 26 01:00:03 1997 +0000 @@ -28,7 +28,7 @@ Report bugs to .' -Id='$Id: rcs2log,v 1.40 1997/05/11 20:02:32 eggert Exp eggert $' +Id='$Id: rcs2log,v 1.41 1997/05/13 22:44:08 eggert Exp eggert $' # Copyright 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. @@ -522,11 +522,12 @@ } /^Working file:/ { if (repository == "") filename = $3 } /'"$rlog_revision_pattern"'/, /^(-----------*|===========*)$/ { - if ($0 ~ /'"$rlog_revision_pattern"'/) { + line = $0 + if (line ~ /'"$rlog_revision_pattern"'/) { rev = $2 next } - if ($0 ~ /^date: [0-9][- +\/0-9:]*;/) { + if (line ~ /^date: [0-9][- +\/0-9:]*;/) { date = $2 if (date ~ /\//) { # This is a traditional RCS format date YYYY/MM/DD. @@ -544,12 +545,12 @@ rev = "?" next } - if ($0 ~ /^branches: /) { next } - if ($0 ~ /^(-----------*|===========*)$/) { print ""; next } - if ($0 == "Initial revision" || $0 ~ /^file .+ was initially added on branch .+\.$/) { - $0 = "New file." - } - printf "%s%c", $0, 1 + if (line ~ /^branches: /) { next } + if (line ~ /^(-----------*|===========*)$/) { print ""; next } + if (line == "Initial revision" || line ~ /^file .+ was initially added on branch .+\.$/) { + line = "New file." + } + printf "%s%c", line, 1 } ' |