Re: Fwd: cvs2svn migration issue with keyword substitution

Michael Haggerty <[email protected]> Thu, 11 Aug 2016 15:26:40 +0200
Newsgroups gmane.comp.version-control.subversion.cvs2svn.user
Message-ID <[email protected]>
On 08/11/2016 01:28 PM, Shankar Asam wrote:
> We're using latest version (2.4.0) of cvs2svn tool to migrate CVSNT
> repositories into SVN. We've been able to successfully migrate all our
> repositories. The branches and tags were carried out fine. However,
> there is an issue with keyword expansions in files after migration. The
> keyword $Revision in a file pointing to wrong location (it is showing up
> the latest Revision) where in actual CVSNT files the location was set to
> older location. I have attached the screenshot for the reference (The
> left side screen was CVSNT which shows the Revision 1.3 which is correct
> and on the right side of the screen was in SVN which shows the Revision
> 1.4, the paths also gets changed).

From your screenshot, it looks like CVSNT shows revision 1.13, not 1.3.
So the SVN version shows an *older* revision number, not a newer one.

Note that when you check in a file, CVS stores the file the way it
looked when you checked it in. This is usually *not* the same as the
version of the file that you are creating by the commit. It is only when
the file is checked back *out* again that the $Revision$ keyword is
expanded to the correct version, and then only when the `svn:keywords`
property is set appropriately.

For general information, see

    http://cvs2svn.tigris.org/cvs2svn.html#prep
    http://cvs2svn.tigris.org/faq.html#eol-fixup

http://cvs2svn.tigris.org/source/browse/cvs2svn/trunk/doc/properties.txt?revision=5325&view=markup

The `--keywords-off` option has the effect that Subversion *doesn't* do
this translation when checking the file back out. Also, by default
cvs2svn treats all files as binary, because that makes it less likely
that people will experience corruption of binary files. So what you see
is the version number that is stored in the Subversion repository, which
is the version number that was in the file when it was checked in.

If you want these old versions to display the correct historical CVS
version numbers, then you need to tell cvs2svn to treat them as text
files. You might also want to tweak the `_keyword_handling` to one of
the values documented in doc/properties.txt.

Please also note that CVSNT is *not* standard CVS and one of the
differences is how it handles file modes. So you might have to do some
explicit work to tell cvs2svn which files should be handled as text and
which as binary.

Michael

------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1670&dsMessageId=3181992

To unsubscribe from this discussion, e-mail: [[email protected]].