Enhancement Request (code provided)

From: Douglas Finkle <douglas.finkle@inficon.com>
Date: Tue Mar 25 2003 - 23:57:52 GMT

Hi Karl!

Long time, no talk.... not since I was at GTE Internetworking (BBN),
and was testing some of the earlier versions of cvs2cl.pl. I've
gotten lots of mileage out of the program, and have spread the word
wherever I've gone ;-)

One of my colleagues (rhb) has extended cvs2cl.pl to include the ability
to follow changes from the branch node forward when used in conjunction
with the -F option. Perhaps you could include it in your next release,
(but give credit to Rick).

Below are the diffs between our starting version, and the version after
the patch was applied. My apologies for not knowing the starting version,
but to make it easier I have also attached the completed script.

HTH,
Doug

===================================================================
RCS file: /system/cvsroot/buildsvc/src/cvs2cl.pl,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -c -r1.1 -r1.1.4.1
*** buildsvc/src/cvs2cl.pl2002/05/21 19:20:541.1
--- buildsvc/src/cvs2cl.pl2002/07/16 23:26:041.1.4.1
***************
*** 8,15 ****
  ### ###
  ##############################################################
  
! ## $Revision$
! ## $Date$
  ## $Author$
  ##
  ## (C) 1999 Karl Fogel <kfogel@red-bean.com>, under the GNU GPL.
--- 8,15 ----
  ### ###
  ##############################################################
  
! ## $Revision$
! ## $Date$
  ## $Author$
  ##
  ## (C) 1999 Karl Fogel <kfogel@red-bean.com>, under the GNU GPL.
***************
*** 78,84 ****
  my $Log_Source_Command = "cvs log";
  
  # In case we have to print it out:
! my $VERSION = '$Revision$';
  $VERSION =~ s/\S+\s+(\S+)\s+\S+/$1/;
  
  ## Vars set by options:
--- 78,84 ----
  my $Log_Source_Command = "cvs log";
  
  # In case we have to print it out:
! my $VERSION = '$Revision$';
  $VERSION =~ s/\S+\s+(\S+)\s+\S+/$1/;
  
  ## Vars set by options:
***************
*** 187,192 ****
--- 187,193 ----
  # within a file:
  my $logmsg_separator = "----------------------------";
  
+ my $No_Ancestors = 0;
  
  ############### End globals ############
  
***************
*** 398,404 ****
                goto dengo;
              }
              # Non-trivial case: check if rev is ancestral to branch
! elsif ((length ($branch_number)) > (length ($revision)))
              {
                $revision =~ /^((?:\d+\.)+)(\d+)$/;
                my $r_left = $1; # still has the trailing "."
--- 399,405 ----
                goto dengo;
              }
              # Non-trivial case: check if rev is ancestral to branch
! elsif (((length ($branch_number)) > (length ($revision))) &&
!$No_Ancestors)
              {
                $revision =~ /^((?:\d+\.)+)(\d+)$/;
                my $r_left = $1; # still has the trailing "."
***************
*** 1604,1609 ****
--- 1605,1613 ----
        $Hide_Filenames = 1;
        $After_Header = "";
      }
+ elsif ($arg =~ /^--no-ancestors/) {
+ $No_Ancestors = 1;
+ }
      else {
        # Just add a filename as argument to the log command
        $Log_Source_Command .= " $arg";
***************
*** 1741,1746 ****
--- 1745,1751 ----
    -I REGEXP, --ignore REGEXP Ignore files whose names match REGEXP
    -C, --case-insensitive Any regexp matching is done
case-insensitively
    -F BRANCH, --follow BRANCH Show only revisions on or ancestral to
BRANCH
+ --no-ancestors When using -F, only track changes since the
BRANCH started
    -S, --separate-header Blank line between each header and log
message
    --no-wrap Don't auto-wrap log message (recommend -S
also)
    --gmt, --utc Show times in GMT/UTC instead of local time

Received on Wed Mar 26 09:04:02 2003

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