Bug 66877

Summary: $Id$ strings are a revision behind in cvsweb
Product: Base System Reporter: Yar Tikhiy <yar>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.9-RELEASE   
Hardware: Any   
OS: Any   

Description Yar Tikhiy 2004-05-19 13:50:29 UTC
	The information contained in strings expanded from $Id$
	keywords lags a revision behind.  This is observed in HTML
	renditions of files, annotated displays, downloads, and
	diffs at cvsweb.freebsd.org.

How-To-Repeat: 	Use cvsweb.freebsd.org to examine revisions of files in the
	FreeBSD repository dating back to time when $FreeBSD$ wasn't
	there.

	Just one example:
	http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet/in_pcb.h.diff?r1=1.6&r2=1.7

	===================================================================
	RCS file: /usr/local/www/cvsroot/FreeBSD/src/sys/netinet/in_pcb.h,v
	retrieving revision 1.6
	retrieving revision 1.7
	diff -u -p -r1.6 -r1.7
	--- src/sys/netinet/in_pcb.h	1995/04/09 01:29:19	1.6
	+++ src/sys/netinet/in_pcb.h	1995/04/09 16:46:47	1.7
	@@ -31,11 +31,13 @@
	  * SUCH DAMAGE.
	  *
	  *	@(#)in_pcb.h	8.1 (Berkeley) 6/10/93
	- * $Id: in_pcb.h,v 1.5 1995/03/16 18:14:52 bde Exp $
	+ * $Id: in_pcb.h,v 1.6 1995/04/09 01:29:19 davidg Exp $
	  */

	Note that not only revision numbers are off by 1, but the other
	revision info relates to the previous revisions, too--rev. 1.7
	of the file was actually by jkh etc.
Comment 1 Ceri Davies freebsd_committer freebsd_triage 2004-09-27 12:07:41 UTC
Responsible Changed
From-To: freebsd-www->freebsd-bugs

This isn't a cvsweb problem; command line cvs does the same thing: 

$ cvs -R diff -u -p -r1.6 -r1.7 src/sys/netinet/in_pcb.h 
Index: src/sys/netinet/in_pcb.h 
=================================================================== 
RCS file: /home/ncvs/src/sys/netinet/in_pcb.h,v 
retrieving revision 1.6 
retrieving revision 1.7 
diff -u -u -p -r1.6 -r1.7 
--- src/sys/netinet/in_pcb.h	9 Apr 1995 01:29:19 -0000	1.6 
+++ src/sys/netinet/in_pcb.h	9 Apr 1995 16:46:47 -0000	1.7 
@@ -31,12 +31,14 @@ 
* SUCH DAMAGE. 
* 
*	@(#)in_pcb.h	8.1 (Berkeley) 6/10/93 
- * $Id: in_pcb.h,v 1.5 1995/03/16 18:14:52 bde Exp $ 
+ * $Id: in_pcb.h,v 1.6 1995/04/09 01:29:19 davidg Exp $ 
*/ 

#ifndef _NETINET_IN_PCB_H_ 
#define _NETINET_IN_PCB_H_ 

+#include <sys/queue.h> 
+ 
/* 
* Common structure pcb for internet protocol implementation. 
* Here are stored pointers to local and foreign host table
Comment 2 Simon L. B. Nielsen freebsd_committer freebsd_triage 2004-09-27 12:20:48 UTC
On 2004.09.27 11:11:13 +0000, Ceri Davies wrote:
> Synopsis: $Id$ strings are a revision behind in cvsweb
> 


> This isn't a cvsweb problem; command line cvs does the same thing:
> 
> $ cvs -R diff -u -p -r1.6 -r1.7 src/sys/netinet/in_pcb.h
> Index: src/sys/netinet/in_pcb.h
> ===================================================================
> RCS file: /home/ncvs/src/sys/netinet/in_pcb.h,v
> retrieving revision 1.6
> retrieving revision 1.7
> diff -u -u -p -r1.6 -r1.7
> --- src/sys/netinet/in_pcb.h	9 Apr 1995 01:29:19 -0000	1.6
> +++ src/sys/netinet/in_pcb.h	9 Apr 1995 16:46:47 -0000	1.7
> @@ -31,12 +31,14 @@
>   * SUCH DAMAGE.
>   *
>   *	@(#)in_pcb.h	8.1 (Berkeley) 6/10/93
> - * $Id: in_pcb.h,v 1.5 1995/03/16 18:14:52 bde Exp $
> + * $Id: in_pcb.h,v 1.6 1995/04/09 01:29:19 davidg Exp $


Well, this is actually correct.  The reason is that the FreeBSD CVS
repository now only expands $FreeBSD$ when extracting, nothing else.

What you see above is actually the real commit.  When 1.7 was
committed the Id line from 1.6 (which was of course in the committers
local file) was actually committed into CVS like any other change.  I
think more recent versions of CVS has changed that so the keyword
expansions are not actually commited in.

If you look at the actual ,v file in the repostiory it has:

1.7
log
@#include <sys/queue.h> or die horribly.
@
text
@d34 1
a34 1
 * $Id: in_pcb.h,v 1.6 1995/04/09 01:29:19 davidg Exp $
a38 2

#include <sys/queue.h>
@

I don't really think there is a way to "fix" this, since that would
require some magic to tell CVS when it should expand $Id$ and when it
should not.

-- 
Simon L. Nielsen
FreeBSD Documentation Team
Comment 3 Ceri Davies freebsd_committer freebsd_triage 2004-09-27 12:30:40 UTC
State Changed
From-To: open->closed

Simon's explanation works for me; this is not keyword expansion per se, 
it's the *actual delta* that is being shown.
Comment 4 ru freebsd_committer freebsd_triage 2004-09-27 13:40:27 UTC
On Mon, Sep 27, 2004 at 11:11:13AM +0000, Ceri Davies wrote:
> This isn't a cvsweb problem; command line cvs does the same thing:
> 
> $ cvs -R diff -u -p -r1.6 -r1.7 src/sys/netinet/in_pcb.h
> Index: src/sys/netinet/in_pcb.h
> ===================================================================
> RCS file: /home/ncvs/src/sys/netinet/in_pcb.h,v
> retrieving revision 1.6
> retrieving revision 1.7
> diff -u -u -p -r1.6 -r1.7
> --- src/sys/netinet/in_pcb.h	9 Apr 1995 01:29:19 -0000	1.6
> +++ src/sys/netinet/in_pcb.h	9 Apr 1995 16:46:47 -0000	1.7
> @@ -31,12 +31,14 @@
>   * SUCH DAMAGE.
>   *
>   *	@(#)in_pcb.h	8.1 (Berkeley) 6/10/93
> - * $Id: in_pcb.h,v 1.5 1995/03/16 18:14:52 bde Exp $
> + * $Id: in_pcb.h,v 1.6 1995/04/09 01:29:19 davidg Exp $
>   */
>  
>  #ifndef _NETINET_IN_PCB_H_
>  #define _NETINET_IN_PCB_H_
>  
> +#include <sys/queue.h>
> +
>  /*
>   * Common structure pcb for internet protocol implementation.
>   * Here are stored pointers to local and foreign host table
> 
Indeed.

This is because $Id$'s are updated on checkout, and FreeBSD no
longer uses $Id$ for its internal purpose -- we use $FreeBSD$
instead.  Moreover, our CVSROOT scripts will record un-expanded
version of the tag ($FreeBSD$).

For $Id$'s, you'll get what you see because it's what's actually
stored in the repo, i.e., $Id$ are no longer expanded in FreeBSD.


Cheers,
-- 
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer