Discussion:
First cvs2svn conversion, problem with "symbols"
Bo Berglund
2017-12-07 20:44:08 UTC
Permalink
Info:
OS on which conversion runs: Ubuntu10 (i386)
cvs2svn version = 2.5.0
repository source: cvsnt on Windows
cvs parser: cvsnt on ubuntu (this is why I am on ubuntu10)
python version: 2.6.5
cvsnt version on windows and ubuntu is the same.
options file: Example file edited as per suggestions

Problem:
I have taken one of our CVS repositories, which contains just 16
projects, as a test case for the full conversion to come later.
I used the options file approach so that I could use the automatic
listing of these projects.
What happens is that when I run the conversion after pass 1 (listing
all the ,v files) this is displayed:

Time for pass1 (CollectRevsPass): 4.491 seconds.
----- pass 2 (CleanMetadataPass) -----
Converting metadata to UTF8...
Done
Time for pass2 (CleanMetadataPass): 0.036 seconds.
----- pass 3 (CollateSymbolsPass) -----
ERROR: Problems determining how symbols should be converted:
It is not clear how the following symbols should be converted.
Use --symbol-hints, --force-tag, --force-branch, --exclude, and/or
--symbol-default to resolve the ambiguity.
'EAGLE2-version1' is a tag in 13 files, a branch in 0 files, a
trivial import in 0 files, a pure import in 0 files, and has commits
in 0 files in 0 files
'start' is a tag in 13 files, a branch in 0 files, a trivial
import in 0 files, a pure import in 0 files, and has commits in 0
files
--- and the list continues looking approximately as above ---

I have no idea what I should do about this, the "symbols" are just
tags on certain revisions in a number of files. Some tags might be
regular tags and some branch tags.
But that is normal in a CVS repository so what is it complaining about
and what should I do about it?

In the options file I have this at the end as suggested in the
documentation:

#Importing all projects in a CVS repository as separate projects

# 1)List all projects automatically
import os
cvs_repo_main_dir = '/home/bosse/CVSREPOS/Bosse'
projects = os.listdir(cvs_repo_main_dir)

# 2) Probably you don't want to convert CVSROOT:
projects.remove('CVSROOT')

# 3) Now loop projects and add to conversion list
for project in projects:
run_options.add_project(
cvs_repo_main_dir + '/' + project,
trunk_path=(project + '/trunk'),
branches_path=(project + '/branches'),
tags_path=(project + '/tags'),
)

# Change this option to True to turn on profiling of cvs2svn (for
# debugging purposes):
run_options.profiling = False

What should I do to handle the symbols issue?
--
Bo Berglund
Developer in Sweden
Bo Berglund
2017-12-08 11:24:19 UTC
Permalink
On Thu, 07 Dec 2017 21:44:08 +0100, Bo Berglund
Post by Bo Berglund
I have taken one of our CVS repositories, which contains just 16
projects, as a test case for the full conversion to come later.
I used the options file approach so that I could use the automatic
listing of these projects.
What happens is that when I run the conversion after pass 1 (listing
Time for pass1 (CollectRevsPass): 4.491 seconds.
----- pass 2 (CleanMetadataPass) -----
Converting metadata to UTF8...
Done
Time for pass2 (CleanMetadataPass): 0.036 seconds.
----- pass 3 (CollateSymbolsPass) -----
It is not clear how the following symbols should be converted.
Use --symbol-hints, --force-tag, --force-branch, --exclude, and/or
--symbol-default to resolve the ambiguity.
I have no idea what I should do about this, the "symbols" are just
tags on certain revisions in a number of files. Some tags might be
regular tags and some branch tags.
But that is normal in a CVS repository so what is it complaining about
and what should I do about it?
My full options file is too big to be posted due to all the comments
(I copied the cvs2svn-example.options file as a starting point).
Is there some simple way to get rid of all lines starting with a
comment?

In any case this is what I have in the section regarding symbols
(manually removed commented lines):

global_symbol_strategy_rules = [
ExcludeTrivialImportBranchRule(),
ExcludeVendorBranchRule(),
UnambiguousUsageRule(),
BranchIfCommitsRule(),
HeuristicStrategyRule(),
HeuristicPreferredParentRule(),
]

And there are no entries in the projects listing function to set
specific symbol handling per project, so I assume the global setting
will be used:

for project in projects:
run_options.add_project(
cvs_repo_main_dir + '/' + project,
trunk_path=(project + '/trunk'),
branches_path=(project + '/branches'),
tags_path=(project + '/tags'),
)


When I run a conversion it stops with this message (the list has been
truncated since it contains more symbols but with the same content):

----- pass 3 (CollateSymbolsPass) -----
ERROR: Problems determining how symbols should be converted:
It is not clear how the following symbols should be converted.
Use --symbol-hints, --force-tag, --force-branch, --exclude, and/or
--symbol-default to resolve the ambiguity.
'EAGLE2-version1' is a tag in 13 files, a branch in 0 files, a
trivial import in 0 files, a pure import in 0 files, and has commits
in 0 files
'start' is a tag in 13 files, a branch in 0 files, a trivial
import in 0 files, a pure import in 0 files, and has commits in 0
files
'bosse' is a tag in 0 files, a branch in 13 files, a trivial
import in 13 files, a pure import in 13 files, and has commits in 13
files
'CVSMailer_1-6-1-58_2016-11-24' is a tag in 125 files, a branch in
0 files, a trivial import in 0 files, a pure import in 0 files, and
has commits in 0 files

What am I missing? It seems like the symbol handling defined in the
options file is not used....
And the advice to set various command line options does not work since
they are discarded when one uses an option file in which these options
cannot be entered...

Seems like I am pretty close and yet not there.
--
Bo Berglund
Developer in Sweden
Bo Berglund
2017-12-08 15:37:48 UTC
Permalink
On Fri, 08 Dec 2017 12:24:19 +0100, Bo Berglund
Post by Bo Berglund
What am I missing? It seems like the symbol handling defined in the
options file is not used....
I ended up putting the following into the options file where the
sub-projects are defined:

import os
cvs_repo_main_dir = '/home/bosse/CVSREPOS/Bosse'
projects = os.listdir(cvs_repo_main_dir)
projects.remove('CVSROOT')
for project in projects:
run_options.add_project(
cvs_repo_main_dir + '/' + project,
trunk_path=(project + '/trunk'),
branches_path=(project + '/branches'),
tags_path=(project + '/tags'),
symbol_strategy_rules=global_symbol_strategy_rules,
)

Note teh last line, which seems to be necessary for the default rules
to be applied....

Anyway, now I got past the early symbol parsing error and wound up
here:

----- pass 16 (OutputPass) -----
Starting Subversion Dumpfile.
Starting Subversion r1 / 855
Starting Subversion r2 / 855
ERROR: The command '/usr/bin/cvs -Q -R -f -d
:local:/home/bosse/CVSREPOS/Bosse co -r1.1.1.1 -p -kb
cvsweb/cvsweb.cgi' failed with exit status=1
and the following output:
cvs checkout: connect to 127.0.0.1(127.0.0.1):2402 failed: Connection
refused
cvs [checkout aborted]: Couldn't connect to lock server

This error is strange since it implies that cvs2svn is trying to
access the cvs *server* to do some checkout, which of course will fail
miserably since the documentation specifically states that cvs2svn
MUST operate on the CVS repository files directly!

And it also states that one should make a *copy* of the repository
files for cvs2svn to operate on! So my files are not a real repository
served by a server at all.

What gives?
Is there some option inside the options file which needs to be set to
declare that the cvs access is by way of direct file manipulation
using the cvs *executable* rather than a service?
This is what I have used in the options file:

ctx.revision_collector = NullRevisionCollector()
ctx.revision_reader =
CVSRevisionReader(cvs_executable=r'/usr/bin/cvs')

Please shed some light on this!
It seems like I am really close and yet not there at all....
--
Bo Berglund
Developer in Sweden
Loading...