[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Customizable Keywords

From: Eric Gillespie, Jr. <epg_at_pretzelnet.org>
Date: 2001-12-12 15:48:42 CET

Karl Fogel <kfogel@newton.ch.collab.net> writes:

> Can you give some reasons why an equivalent of $Id$ is
> necessary? I.e., Why it's worthwhile to have keywords that
> are just combinations of other keywords?

It's about conciseness. Compare:

# $Id: .zshrc,v 1.23 2001/12/11 00:25:35 epg Exp $
# $LastChangedRevision: 600$ $LastChangedDate: 2001-12-11 00:25:35$ $LastChangedBy: epg$

The second is a lot more typing and does not fit onto an
80-column display, even without the filename. There's no
filename because no $FileName$ or whatever is listed in the
keyword notes. HeadURL is going to be way too long (not to say it
isn't useful, but FileName and Id are needed too).

Id is a nice, concise way of expressing just about everything you
want to know about a file. Looks very nice with ident(1).

As for it just being a combination of keywords, you could provide
only the core keywords and then allow users to build their own
custom keywords based on format strings. Those who want Id could
build that, but most would just build a project keyword
resembling Id. Once the keywords code goes in i should be able
to provide a patch for this.

> What do these keywords do? Why are they preferable to $Id$
> or to the equivalent combination of more primitive
> keywords?

See <http://cvsweb.netbsd.org/bsdweb.cgi/basesrc/libexec/atrun/atrun.8?rev=1.10&content-type=text/x-cvsweb-markup>:

.\" $NetBSD: atrun.8,v 1.10 2000/11/07 06:43:25 lukem Exp $
.\" $OpenBSD: atrun.8,v 1.4 1998/05/22 22:16:29 deraadt Exp $
.\" $FreeBSD: atrun.man,v 1.3 1997/02/22 14:20:55 peter Exp $

CVS's -ko is an either/or thing; but that's not what you want.
You want your project keyword to expand but not the others.

-- 
Eric Gillespie, Jr. <*> epg@pretzelnet.org
"When everyone has to reinvent the wheel, many people invent
 square wheels."
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:52 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.