[jdev] Re: Use of $Id$ in source files

Bresler, Jonathan Jonathan.Bresler at usi.net
Wed Dec 22 07:08:13 CST 2004

While the CVS "sandbox" knows which version is checked out,
While one can use viewcvs.cgi to compare versions,

One is still left with a significant problem.

What version of each file in included in a particular release?

For example: jabberd/lib/pool.c in jabberd-1.4.3 is version ???

Based upon timestamp in viewcvs.cgi, I would guess that its
Version 1.5.  Checking the diffs between 1.5 and 1.6 and the
Diffs between 1.4 and 1.5...i can conclude that 1.5 is indeed
The right version.

This is sub-optimal.  The addition of less than 80 bytes to the 
Source file answers the question immediately.

The addition of about 80 bytes to the code

Static const char rcsid[] = "$Id: $

Allows one to use ident(1) to definitively answer the question:

What version of the code are you running?

Example: indent `which ldd`
	$FreeBSD: src/usr.bin/ldd/ldd.c,v 2001/07/11 23:59:11 obrien Exp $

The merging of two branches will be impacted. There will be one additional conflict
Per file....a rather small price to pay.

Jonathan M Bresler

-----Original Message-----
From: jdev-bounces at jabber.org [mailto:jdev-bounces at jabber.org] On Behalf Of Neil Stevens
Sent: Wednesday, December 22, 2004 3:06 AM
To: Jabber software development list
Subject: [jdev] Re: Use of $Id$ in source files

Hash: SHA1

On Tuesday 21 December 2004 08:24 am, Bresler, Jonathan wrote:
> Folks,
> It is surprising that the source files for jabberd14 and jabberd2
> do not contain the "$Id" string used by RCS / CVS / SVN(?)
> To mark each file with its version number.
> These $Id$ make it much easier to discuss the files.
> "see version 1.58 of jabberd14/jabberd/jabber.c"
> Rather than, " the version checked into CVS on 2004-12-21 15:00"
> Your thoughts?
> Is this idea complete whacked?

The idea makes merging harder because it adds unnecessary conflicts (as any 
two branches will have conflicts in the Id line), and isn't necessary to 
acheive your goal of knowing what version was checked out.  The sandbox 
knows the version you checked out; use cvs status:

> cvs status index.rhtml
File: index.rhtml       Status: Up-to-date

   Working revision:    1.46    Tue Dec 21 03:22:20 2004
   Repository revision: 1.46    /home/neil/.cvs/neil/index.rhtml,v
   Sticky Tag:          (none)
   Sticky Date:         (none)
   Sticky Options:      (none)

- -- 
Neil Stevens - neil at hakubi.us
"The world is a dangerous place to live; not because of the people who
are evil, but because of the people who don't do anything about it."
                                                 -- Albert Einstein(?)
Version: GnuPG v1.2.6 (FreeBSD)

jdev mailing list
jdev at jabber.org

Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.817 / Virus Database: 555 - Release Date: 12/15/2004

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.817 / Virus Database: 555 - Release Date: 12/15/2004

More information about the JDev mailing list