Re: reproducable test case: no svn:keywords props; keywords still expanded and different !
Michael Haggerty <[email protected]>
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.user |
|---|---|
| Message-ID | <[email protected]> |
Bernhard Merkle wrote:
> okay, a minor additional question:
> I have activated: --keywords-off however in my java files $Header etc
> seems to be touched by the internal cvs2svn reader.what is happening here ?
>
> e.g.
> // CVS version
>
> return "$Header: C:/_TDV/cvs_tdv/java/util/TracingUtil.java,v
> 1.2 2007/06/21 10:18:30 merkle Exp $";
>
>
> // converted CVS2SVN version
>
> return "$Header:
> /cygdrive/c/arbeit/_src/scm/cvs2svn/C:\_TDV\cvs_tdv/java/util/TracingUtil.java,v
> 1.2 2007-06-21 10:18:30 merkle Exp $";
Neither one of these keyword expansions was done by Subversion, as can
be seen (for example) from the CVS-style revision number "1.2" rather
than a Subversion-style revision number like "r1234".
The text that CVS stores for a file revision is the one that was checked
in, with the keywords expanded as they were in the committer's working
copy at the time of the commit. This usually means that the text for
version N in the CVS repository actually contains the keywords as
expanded for version N-1 in the working copy of the user who committed
revision N. But in fact it could even be another text, for example if
the user edited the line containing the keyword before committing.
Confusing things can easily happen.
CVS expands the keywords for version N when version N is checked out
into a working copy, assuming of course that keyword expansion is turned
on for the file and not suppressed using CVS's -kk option.
If a file is configured to have no keyword expansion in cvs2svn, then
cvs2svn stores the file exactly as it is stored in the CVS repository.
Usually, this option is used when the file is binary and doesn't have
any keyword strings anyway. But if the file really *did* have CVS
keywords, then the text that cvs2svn extracts is usually the text with
the keyword expanded for some other revision.
To see what cvs really did, check how the svn:keyword property is set on
the file. For example, type the command
svn proplist -v -r $SVNREV $URL
where $URL is the path or URL of the TracingUtil.java file that seems to
be misbehaving.
For completeness let me also mention that the --keywords-off option only
turns off one way of turning on svn:keywords, namely the automatic one
that is otherwise used for non-binary files. It is possible to set the
svn:keyword property via some other mechanism (e.g., an auto-props file)
even if the --keywords-off option was used.
Michael
------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1670&dsMessageId=2465880
To unsubscribe from this discussion, e-mail: [[email protected]].