[Zope-Coders] Re: cvs keyword expansion

Philipp von Weitershausen philipp at weitershausen.de
Fri Sep 19 06:48:53 EDT 2003


Godefroid Chapelle wrote:
> Hi all, I regularly have problems with the cvs keywords when using 
> branches : I get files with garbage like the following
> 
> <<<<<<< Image.py
> <<<<<<< Image.py
> <<<<<<< Image.py
> <<<<<<< Image.py
> __version__='$Revision: 1.145.2.2 $'[11:-2]
> =======
> __version__='$Revision: 1.146 $'[11:-2]
>  >>>>>>> 1.146
> =======
> __version__='$Revision: 1.146 $'[11:-2]
>  >>>>>>> 1.146
> =======
> __version__='$Revision: 1.145.2.2 $'[11:-2]
>  >>>>>>> 1.145.2.2
> =======
> __version__='$Revision: 1.146 $'[11:-2]
>  >>>>>>> 1.146
> 
> As I do not have the problem with every files, I assume this is not due 
> to a misuse on my side. Anyway, I do not understand what causes those 
> problems.

It's an issue of how CVS deals with keywords with respect to branches 
and HEAD. Technically, this *is* a user mistake on your part but I have 
to admit that CVS doesn't make it easy to understand why. :)

See the following section of the CVS manual for some more explanation:
http://www.cvshome.org/docs/manual/cvs-1.12.1/cvs_5.html#SEC64

(BTW, I strongly recommend this manual whenever in CVS doubt).

> One of the question related to that is how often the __version__ pattern 
> is needed or if could disappear.

I personally don't like __version__. I prefer an $Id$ in the docstring, 
such as we use for Zope3.

Yours happily-to-be-back-in-Europe-again,

Philipp





More information about the Zope-Coders mailing list