[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug or known weakness in CVS RCS-keyword expansion?
From: |
Peter Toft |
Subject: |
Re: Bug or known weakness in CVS RCS-keyword expansion? |
Date: |
Wed, 12 Jul 2006 06:35:19 +0200 (CEST) |
On Wed, 12 Jul 2006, Stuart Cooper wrote:
> > try cvs update -A instead.
>
> nope, that didn't work but it was well worth a try.
Yeah - I use "update -A" to get the current versions of all files, and yes
it clears the stickty tags. But as you write it is not a solution for what
I wrote yesterday.
>
> I've got a handscrawled note next to $Name$ in my reference guide which reads:
>
> ################################################################
> "This keyword is expanded only if one checks out with an explicit tag name"
> eg cvs co -r tag gives a $Name: tag$ expansion of the keyword"
> ################################################################
>
> Obviously the rules are a bit more subtle than that. Keyword expansion happens
> at checkout time, so I guess your update -r TAG1 causes a checkout of a.txt
> only and not b.txt (regardless of whether it's update -A -r TAG1 or just
> update -r TAG1) and the expansion of $Name$ happens to a.txt only as that's
> the only file which gets checked out.
And I would actually prefer to have b.txt changed as well in my example.
> The Tag in the text file CVS/Entries is kept OK in each case:
> TAG1
> $ cat CVS/Entries
> /a.txt/1.1.1.1/Tue Jul 11 23:59:34 2006//TTAG1
> /b.txt/1.1.1.1/Wed Jul 12 00:14:22 2006//TTAG1
> D
>
> $ cat CVS/Entries
> /a.txt/1.1.1.1/Tue Jul 11 23:59:34 2006//TTAG2
> /b.txt/1.2/Wed Jul 12 00:14:16 2006//TTAG2
> D
>
> Notice when I do the cvs update -r TAG1 from a TAG2 state, I only get
> one file updated:
> $ cvs update -r TAG1 .
> cvs update: Updating .
> U b.txt
>
> Only b.txt checked out by this revert-update, so only b.txt keyword-expanded.
>
> I guess to be completely sure of $Name$ validity, you'd trash the
> project completely
> and do a fresh cvs co -r TAG1 project
Yep - which was a part of my example, but that is clearly a bad solution,
and I guess for most large projects NOT possible in reality.
> Cheers,
> Stuart.
Best
Peter
Peter Toft, Ph.D. address@hidden http://pto.linux.dk
"First they ignore you, then they ridicule you, then they fight you, then you
win."
-- Mahatma Gandhi