[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keword (re) expansion

From: Russ Sherk
Subject: Re: keword (re) expansion
Date: Fri, 17 Feb 2006 16:47:51 -0500

On 2/17/06, Mark D. Baushke <address@hidden> wrote:
Hash: SHA1

Igor Okulist <address@hidden> writes:

> > In general, the $Name$ substitution is intended for a clean checkout of
> > your sources based on the tag.
> Mark,
> Yes, I understand the above feature.

No, from your comments, I do not believe you understand.

Clarification: keywords (e.g.  $RCSfile: $ $Name: $) are RCS entities  ....

Hmm.  Now that I look it up (, this is incorrect.  $Name: $ seems to be a cvs specific keyword and thus must be expanded by CVS.  It would be logical then to assume that if the sticky tag changes (i.e. cvs stat shows 'Sticky Tag:' not 'Sticky Tag:') then $Name: $ should change as well.

And from some cvs manual:
$Name: $ If a sticky tag is in effect, this is the name of that tag. Otherwise blank.

$Name: guide_release_1 $


A little testing should show that this is true.

Hmmm again.  I just tried to reproduce and some curious behaviour was observed:
- created a file and added to cvs with no keywords
- checkout file
- add $Name: $ $RCSfile$ $Author$
- commit
- tag (TAG_0)
- up (TAG_0)
- Observe: RCS keywords are properly expanded...  but $Name: $ not expanded.  cvs stat shows 'Sticky Tag: TAG_0'
- delete file
- cvs up
- Observe: All keywords expanded.

Maybe it should be expanded the same as RCS keywords.  Any reason why not?



The only reliable way you will get the files to substitute $Name$
for you is to do an initial checkout with of the tag you want.
CVS was not really designed to do this kind of hackery for you.

> I guess then I am looking for a re-checkout. Since many files
> are shared between different tags, build would be much faster than
> clean checkout.

Doing a 'cvs checkout' where cvs sees an existing tree will just be
converted into a 'cvs update' the local side will not see any modified
timestamps and will therefore not do the round-trip to the server to get
the replacements for $Name$.

> For "re-checkout" I should 'cd' just above the cvs controlled
> directory and use 'cvd -d'. Any other flags I should pass to cvs ?


> Also does cvs store which files have/do not have kewords?

No, or at least not separately from the actual conents of the file
in the repository.

        -- Mark
Version: GnuPG v1.2.3 (FreeBSD)


Info-cvs mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]