From owner-freebsd-newbies@FreeBSD.ORG Sat Oct 2 07:40:05 2004 Return-Path: Delivered-To: freebsd-newbies@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A87BC16A4CE; Sat, 2 Oct 2004 07:40:05 +0000 (GMT) Received: from blackwater.lemis.com (wantadilla.lemis.com [192.109.197.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC4B343D31; Sat, 2 Oct 2004 07:40:03 +0000 (GMT) (envelope-from grog@lemis.com) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 06D5E85649; Sat, 2 Oct 2004 15:08:37 +0930 (CST) Date: Sat, 2 Oct 2004 15:08:36 +0930 From: Greg 'groggy' Lehey To: robg Message-ID: <20041002053836.GN460@wantadilla.lemis.com> References: <5c389d3b041001211056012a3f@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OQhbRXNHSL5w/5po" Content-Disposition: inline In-Reply-To: <5c389d3b041001211056012a3f@mail.gmail.com> User-Agent: Mutt/1.4.2.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 X-Mailman-Approved-At: Sat, 02 Oct 2004 12:40:39 +0000 cc: FreeBSD Questions Subject: Re: "$Id: index.html,v 1.46 2004/08/19 23:15:05 grog Exp $" ? X-BeenThere: freebsd-newbies@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Gathering place for new users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Oct 2004 07:40:05 -0000 --OQhbRXNHSL5w/5po Content-Type: text/plain; charset=us-ascii Content-Disposition: inline [redirected to FreeBSD-questions; this is a technical issue] On Saturday, 2 October 2004 at 0:10:40 -0400, robg wrote: > Hi: > > I see this at the end of a lot of documents: > > $Id: index.html,v 1.46 2004/08/19 23:15:05 grog Exp $ > > or something similar. How is that done? Is it done from a text > editor that just appends it by itself? This comes from RCS or CVS. I'll talk about RCS below, because it's easier. > How would I go about doign it? Start with a file with just $Id$ in it. This file is obviously called index.html (in fact, to judge by the date and revision ID, it's the current version of my home page, http://www.lemis.com/grog/index.html). Then check it in with the ci command: $ ci -u index.html index.html,v <-- index.html enter description, terminated with single '.' or end of file: NOTE: This is NOT the log message! >> Home page >> ^D initial revision: 1.1 done If you now look at the file, the $Id$ will have changed to (in this case) $Id: index.html,v 1.1 2004/10/02 05:29:27 grog Exp $. When you then want to update the file, you first need to check it out (the version you have is write-protected). Do this with: $ co -l index.html Make your changes; when you're done, check in again with ci: $ ci -u index.html index.html,v <-- index.html new revision: 1.2; previous revision: 1.1 enter log message, terminated with single '.' or end of file: >> Added text >> ^D done The text after >> gets put into the revision log. You can look at it with rlog: $ rlog index.html RCS file: index.html,v Working file: index.html head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: Home page ---------------------------- revision 1.2 date: 2004/10/02 05:33:39; author: grog; state: Exp; lines: +2 -1 Added text ---------------------------- revision 1.1 date: 2004/10/02 05:29:27; author: grog; state: Exp; Initial revision ---------------------------- ============================================================================= You can also check out older versions and compare things; somewhere there must be a tutorial. One thing you should note is that for any file index.html, the "control file" (that contains all the revisions and the logs and things) is called index.html,v. By default it gets put in the same directory as the file you're tracking, but if you have a subdirectory RCS (which I recommend), it'll get put there instead. Greg -- See complete headers for address and phone numbers. --OQhbRXNHSL5w/5po Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBXj7cIubykFB6QiMRAoMQAJ4v4PQ5nV62OTrP6+sjvvxw5lUkkgCfVE/O 7uKJFzLEDFVnwvrRR+B2lp4= =BkBq -----END PGP SIGNATURE----- --OQhbRXNHSL5w/5po--