[cvsnt] BUG: RCS keywords and loginfo

Jim Hyslop jimh at view22.com
Fri Oct 20 18:40:46 BST 2006


Tony Hoyle wrote:
> Jim Hyslop wrote:
> 
> > 'loginfo' is supposed to create a temporary copy of the files being 
> > checked in, on the server. It does not, however, create any 
> files that 
> > contain RCS keywords (well, OK, to be precise I've only 
> tried it with 
> > $Id$ and $Revision$).
> 
> No it doesn't, it's an artefact of the client/server protocol.
> 
> In client/server mode what you're seeing is the local copy of 
> the relevant parts of the sandbox.  That will include only 
> files that are changed.. an unchanged file will not exist there.
> 
> The file does exist - you can tell because the commit 
> actually succeeds.. if it wasn't there then it wouldn't succeed.
> 
> If you don't see a file assume that no significant changes 
> have been done to it.

First off, in my first message I just copied-and-pasted the output of
"cvs version" Both client and server are running build 2382. Sorry about
that.

Sorry, Tony, I have to disagree with you. This is a bug.

My CVSROOT\loginfo file contains the line

cvs-test	cmd /C dir

Please examine the following from my command prompt:

------------ begin extract -------------------------------

C:\cvs\atlas4\activex\cvs-test>echo hello>hhh.txt

C:\cvs\atlas4\activex\cvs-test>cvs add hhh.txt
cvs server: use 'cvs commit' to add this file permanently

C:\cvs\atlas4\activex\cvs-test>cvs ci -m "a file" hhh.txt
RCS file: /activex/cvs-test/hhh.txt,v
done
Checking in hhh.txt;
/activex/cvs-test/hhh.txt,v  <--  hhh.txt
initial revision: 1.1
done
 Volume in drive D is New Volume
 Volume Serial Number is B8F4-60DB

 Directory of D:\cvstemp\cvs-serv1964

10/20/2006  01:23 PM    <DIR>          .
10/20/2006  01:23 PM    <DIR>          ..
10/20/2006  01:23 PM    <DIR>          CVS
10/20/2006  01:23 PM                 6 hhh.txt
               1 File(s)              6 bytes
               3 Dir(s)  15,073,366,016 bytes free

C:\cvs\atlas4\activex\cvs-test>echo $Id$>>hhh.txt

C:\cvs\atlas4\activex\cvs-test>cvs ci -m "Added $Id$ keyword" hhh.txt
Checking in hhh.txt;
/activex/cvs-test/hhh.txt,v  <--  hhh.txt
new revision: 1.2; previous revision: 1.1
done
 Volume in drive D is New Volume
 Volume Serial Number is B8F4-60DB

 Directory of D:\cvstemp\cvs-serv3588

10/20/2006  01:23 PM    <DIR>          .
10/20/2006  01:23 PM    <DIR>          ..
10/20/2006  01:23 PM    <DIR>          CVS
               0 File(s)              0 bytes
               3 Dir(s)  15,073,366,016 bytes free

C:\cvs\atlas4\activex\cvs-test>type hhh.txt
hello
$Id: hhh.txt,v 1.2 2006/10/20 17:23:58 jimh Exp $

C:\cvs\atlas4\activex\cvs-test>echo More stuff>>hhh.txt

C:\cvs\atlas4\activex\cvs-test>cvs ci -m "More stuff" hhh.txt
Checking in hhh.txt;
/activex/cvs-test/hhh.txt,v  <--  hhh.txt
new revision: 1.3; previous revision: 1.2
done
 Volume in drive D is New Volume
 Volume Serial Number is B8F4-60DB

 Directory of D:\cvstemp\cvs-serv3964

10/20/2006  01:29 PM    <DIR>          .
10/20/2006  01:29 PM    <DIR>          ..
10/20/2006  01:29 PM    <DIR>          CVS
               0 File(s)              0 bytes
               3 Dir(s)  15,073,361,920 bytes free

C:\cvs\atlas4\activex\cvs-test>notepad hhh.txt

C:\cvs\atlas4\activex\cvs-test>type hhh.txt
hello
: hhh.txt,v 1.3 2006/10/20 17:29:01 jimh Exp $
More stuff

C:\cvs\atlas4\activex\cvs-test>cvs ci -m "Removed Id" hhh.txt
Checking in hhh.txt;
/activex/cvs-test/hhh.txt,v  <--  hhh.txt
new revision: 1.4; previous revision: 1.3
done
 Volume in drive D is New Volume
 Volume Serial Number is B8F4-60DB

 Directory of D:\cvstemp\cvs-serv2448

10/20/2006  01:29 PM    <DIR>          .
10/20/2006  01:29 PM    <DIR>          ..
10/20/2006  01:29 PM    <DIR>          CVS
10/20/2006  01:29 PM                64 hhh.txt
               1 File(s)             64 bytes
               3 Dir(s)  15,073,361,920 bytes free

C:\cvs\atlas4\activex\cvs-test>

------------ end extract ---------------------------------

You will note that only first and fourth commits (temporary directories
cvs-serv1964 and cvs-serv2448 respectively) show the file hhh.txt. These
two commits correspond to the versions that did not have a $Id$ keyword.
The other two commits, with the keyword, did not copy the file into the
temporary directory, even though there was a significant change. Unless
your definition of "significant change" is different from mine :=)

-- 
Jim


More information about the cvsnt mailing list