[PATCH] New --no-times parameter to disable HH:MM

From: Simon Josefsson <jas@extundo.com>
Date: Sat Jan 18 2003 - 12:06:38 GMT

Emacs C-x 4 a doesn't generate the HH:MM in ChangeLogs:

2003-01-15 19:51 Foo Bar <foo@bar.org>

so I added a --no-times switch to cvs2cl to make it behave the same
way.

Btw, thanks for cvs2cl, I use it for both GNU Libidn and GNU SASL and
it is great.

Index: cvs2cl.pl
===================================================================
RCS file: /usr/local/cvs/cvs2cl/cvs2cl.pl,v
retrieving revision 2.45
diff -u -p -u -w -r2.45 cvs2cl.pl
--- cvs2cl.pl 12 Jan 2003 13:41:25 -0000 2.45
+++ cvs2cl.pl 18 Jan 2003 12:04:45 -0000
@@ -135,6 +135,9 @@ my $FSF_Style = 0;
 # Show times in UTC instead of local time
 my $UTC_Times = 0;
 
+# Show times in output?
+my $Show_Times = 1;
+
 # Show day of week in output?
 my $Show_Day_Of_Week = 0;
 
@@ -810,8 +813,13 @@ sub derive_change_log ()
               # NOT YET DONE
             }
             else {
+ if ($Show_Times) {
               printf LOG_OUT ("%4u-%02u-%02u${wday} %02u:%02u tag %s\n\n",
                               $year+1900, $mon+1, $mday, $hour, $min, $tag);
+ } else {
+ printf LOG_OUT ("%4u-%02u-%02u${wday} tag %s\n\n",
+ $year+1900, $mon+1, $mday, $tag);
+ }
             }
           }
         }
@@ -849,9 +857,15 @@ sub derive_change_log ()
                          $year+1900, $mon+1, $mday, $hour, $min, $author);
           }
           else {
+ if ($Show_Times) {
             $header_line =
                 sprintf ("%4u-%02u-%02u${wday} %02u:%02u %s\n\n",
                          $year+1900, $mon+1, $mday, $hour, $min, $author);
+ } else {
+ $header_line =
+ sprintf ("%4u-%02u-%02u${wday} %s\n\n",
+ $year+1900, $mon+1, $mday, $author);
+ }
           }
 
           $Text::Wrap::huge = 'overflow'
@@ -1677,6 +1691,9 @@ sub parse_options ()
     elsif ($arg =~ /^-w$|^--day-of-week$/) {
       $Show_Day_Of_Week = 1;
     }
+ elsif ($arg =~ /^--no-times$/) {
+ $Show_Times = 0;
+ }
     elsif ($arg =~ /^-r$|^--revisions$/) {
       $Show_Revisions = 1;
     }
@@ -1858,6 +1875,7 @@ Options/Arguments:
   --gmt, --utc Show times in GMT/UTC instead of local time
   --accum Add to an existing ChangeLog (incompat w/ --xml)
   -w, --day-of-week Show day of week
+ --no-times Don't show times in output
   --header FILE Get ChangeLog header from FILE ("-" means stdin)
   --xml Output XML instead of ChangeLog format
   --xml-encoding ENCODING Insert encoding clause in XML header
Received on Sat Jan 18 12:29:35 2003

This archive was generated by hypermail 2.1.8 : Wed Jan 21 2004 - 16:25:34 GMT