[cvsnt] Questions on CVSNT

charles.rosa at gm.com charles.rosa at gm.com
Mon Oct 3 15:56:34 BST 2005


To all,
I have a txt file (that happens to contain R code) that I placed into the
open source version of CVS available from
http://www.march-hare.com/cvspro/

The original file contained lines like:

      # Elasticities, Contribution Margins and Transaction Prices are
considered only at the start of the analysis period;
      # as such, the Date dimension does not apply to these variables
      InpR$ElasticitySelf <-
InpR$ElasticitySelf[InpR$ElasticitySelf$date_id ==
Dimensions$Date$date_id[1], ];  # filter for the first time period
      InpR$ElasticitySelf <- InpR$ElasticitySelf[,
-(1:ncol(InpR$ElasticitySelf))[names(InpR$ElasticitySelf) == "date_id"]];
# drop the Date dimension (column)
      InpR$ElasticityMarket <-
InpR$ElasticityMarket[InpR$ElasticityMarket$date_id ==
Dimensions$Date$date_id[1], ];
      InpR$ElasticityMarket <- InpR$ElasticityMarket[,
-(1:ncol(InpR$ElasticityMarket))[names(InpR$ElasticityMarket) ==
"date_id"]];
      InpR$Price <- InpR$Price[InpR$Price$date_id ==
Dimensions$Date$date_id[1], ];
      InpR$Price <- InpR$Price[, -(1:ncol(InpR$Price))[names(InpR$Price) ==
"date_id"]];
      InpR$CM <- InpR$CM[InpR$CM$date_id == Dimensions$Date$date_id[1], ];
      InpR$CM <- InpR$CM[, -(1:ncol(InpR$CM))[names(InpR$CM) ==
"date_id"]];

After committing the file by issuing the command:

cvs commit RM_Single_Period_Analysis.R

The file is modified by CVS as follows:

      # Elasticities, Contribution Margins and Transaction Prices are
considered only at the start of the analysis period;
      # as such, the Date dimension does not apply to these variables
      InpR$ElasticitySelf <-
InpR$ElasticitySelf[InpR$ElasticitySelf$date_id == Dimensions$Date:
2005/10/03 14:52:44 $date_id[1], ];  # filter for the first time period
      InpR$ElasticitySelf <- InpR$ElasticitySelf[,
-(1:ncol(InpR$ElasticitySelf))[names(InpR$ElasticitySelf) == "date_id"]];
# drop the Date dimension (column)
      InpR$ElasticityMarket <-
InpR$ElasticityMarket[InpR$ElasticityMarket$date_id == Dimensions$Date:
2005/10/03 14:52:44 $date_id[1], ];
      InpR$ElasticityMarket <- InpR$ElasticityMarket[,
-(1:ncol(InpR$ElasticityMarket))[names(InpR$ElasticityMarket) ==
"date_id"]];
      InpR$Price <- InpR$Price[InpR$Price$date_id == Dimensions$Date:
2005/10/03 14:52:44 $date_id[1], ];
      InpR$Price <- InpR$Price[, -(1:ncol(InpR$Price))[names(InpR$Price) ==
"date_id"]];
      InpR$CM <- InpR$CM[InpR$CM$date_id == Dimensions$Date: 2005/10/03
14:52:44 $date_id[1], ];
      InpR$CM <- InpR$CM[, -(1:ncol(InpR$CM))[names(InpR$CM) ==
"date_id"]];


Note that whereever the key word "Date" appears in the original text file,
it is
modified to be:
"Date: 2005/10/03 14:52:44 "

This seems to be a bug in CVS as it actually modifies the text of the file,
thus making incorrect the original code.

If anyone knows why this is happening, and how to stop it, please let me
know.

Thanks, Charlie


-------------------------
Charles H. Rosa, Ph.D.
Staff Research Engineer
General Motors Corporation
R&D and Planning
Mail Code 480-106-359
30500 Mound Rd
Warren, MI 48090-9055
Tel/work/cell: +1 248 670-8389
Fax/work: +1 586 986-0574
Email: charles.rosa at gm.com




More information about the cvsnt mailing list