# HG changeset patch # User Paul Eggert # Date 776990650 0 # Node ID 12b36ece5c2579d7fbf07eff7650dee48ffb4171 # Parent 46da92c1706c409a5264f7a77d1c71e86479d24a Add support for CVS. Work with `rlog's that output ISO 8601 dates. diff -r 46da92c1706c -r 12b36ece5c25 lib-src/=rcs2log --- a/lib-src/=rcs2log Mon Aug 15 09:19:22 1994 +0000 +++ b/lib-src/=rcs2log Mon Aug 15 22:44:10 1994 +0000 @@ -12,7 +12,7 @@ # Author: Paul Eggert -# $Id: rcs2log,v 1.16 1993/10/19 02:50:31 eggert Exp rms $ +# $Id: rcs2log,v 1.17 1994/08/09 20:43:48 rms Exp eggert $ # Copyright 1992, 1993 Free Software Foundation, Inc. @@ -140,32 +140,50 @@ fi datearg="-d>$date" +repository= +rlog=rlog +case $CVSROOT in +?*) + if test -d "$CVSROOT" && test -f CVS/Repository + then + r=`cat $rlogout || exit +$rlog "$datearg" $rlog_options ${1+"$@"} >$rlogout || exit # Get the full name of each author the logs mention, and set initialize_fullname @@ -179,7 +197,7 @@ EOF esac authors=` - sed -n 's|^date: *[0-9]*/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]; *author: *\([^; ]*\).*|\1|p' <$rlogout | + sed -n 's|^date: *[0-9]*[-/][0-9][0-9][-/][0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9][-+0-9]*; *author: *\([^; ]*\).*|\1|p' <$rlogout | case $loginsout in '') sort -u;; ?*) sort -u | comm -23 - $loginsout @@ -290,10 +308,21 @@ /^Working file:/ { filename = $3 } /^date: /, /^(-----------*|===========*)$/ { if ($0 ~ /^branches: /) { next } - if ($0 ~ /^date: [0-9][ \/0-9:]*;/) { - time = substr($3, 1, length($3)-1) + if ($0 ~ /^date: [0-9][- +\/0-9:]*;/) { + date = $2 + if (date ~ /-/) { + # An ISO format date. Replace all "-"s with "/"s. + newdate = "" + while ((i = index(date, "-")) != 0) { + newdate = newdate substr(date, 1, i-1) "/" + date = substr(date, i+1) + } + date = newdate date + } + # Ignore any time zone; ChangeLog has no room for it. + time = substr($3, 1, 8) author = substr($5, 1, length($5)-1) - printf "%s %s %s %s %c", filename, $2, time, author, 13 + printf "%s %s %s %s %c", filename, date, time, author, 13 next } if ($0 ~ /^(-----------*|===========*)$/) { print ""; next } diff -r 46da92c1706c -r 12b36ece5c25 lib-src/rcs2log --- a/lib-src/rcs2log Mon Aug 15 09:19:22 1994 +0000 +++ b/lib-src/rcs2log Mon Aug 15 22:44:10 1994 +0000 @@ -12,7 +12,7 @@ # Author: Paul Eggert -# $Id: rcs2log,v 1.16 1993/10/19 02:50:31 eggert Exp rms $ +# $Id: rcs2log,v 1.17 1994/08/09 20:43:48 rms Exp eggert $ # Copyright 1992, 1993 Free Software Foundation, Inc. @@ -140,32 +140,50 @@ fi datearg="-d>$date" +repository= +rlog=rlog +case $CVSROOT in +?*) + if test -d "$CVSROOT" && test -f CVS/Repository + then + r=`cat $rlogout || exit +$rlog "$datearg" $rlog_options ${1+"$@"} >$rlogout || exit # Get the full name of each author the logs mention, and set initialize_fullname @@ -179,7 +197,7 @@ EOF esac authors=` - sed -n 's|^date: *[0-9]*/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]; *author: *\([^; ]*\).*|\1|p' <$rlogout | + sed -n 's|^date: *[0-9]*[-/][0-9][0-9][-/][0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9][-+0-9]*; *author: *\([^; ]*\).*|\1|p' <$rlogout | case $loginsout in '') sort -u;; ?*) sort -u | comm -23 - $loginsout @@ -290,10 +308,21 @@ /^Working file:/ { filename = $3 } /^date: /, /^(-----------*|===========*)$/ { if ($0 ~ /^branches: /) { next } - if ($0 ~ /^date: [0-9][ \/0-9:]*;/) { - time = substr($3, 1, length($3)-1) + if ($0 ~ /^date: [0-9][- +\/0-9:]*;/) { + date = $2 + if (date ~ /-/) { + # An ISO format date. Replace all "-"s with "/"s. + newdate = "" + while ((i = index(date, "-")) != 0) { + newdate = newdate substr(date, 1, i-1) "/" + date = substr(date, i+1) + } + date = newdate date + } + # Ignore any time zone; ChangeLog has no room for it. + time = substr($3, 1, 8) author = substr($5, 1, length($5)-1) - printf "%s %s %s %s %c", filename, $2, time, author, 13 + printf "%s %s %s %s %c", filename, date, time, author, 13 next } if ($0 ~ /^(-----------*|===========*)$/) { print ""; next }