Re: CVS conversion options

anatoly techtonik <[email protected]>
Newsgroups gmane.comp.version-control.subversion.cvs2svn.user
Message-ID <[email protected]>
On Tue, Oct 13, 2009 at 7:22 AM, Michael Haggerty <[email protected]> wrote:
> anatoly techtonik wrote:
>> I want two CVS modules 'mod1' and 'mod2' to be merged into one 'pj1'
>> project, and make every tag they share include both module.
>> [...]
>> Is there any way to accomplish that I need?
>
> Create a "fake" CVS repository with the layout that you want the SVN
> repository to have.  Put both "mod1" and "mod2" under a single
> subdirectory "pj1", and treat "pj1" as a single project.  You can use
> symlinks if you want to avoid making actual copies of the CVS repository
> directories.
>
>    mkdir $TMP/fakecvs
>    cd $TMP/fakecvs
>    mkdir CVSROOT # cvs2svn needs this
>    mkdir pj1
>    ln -s $REALCVS/mod1 $REALCVS/mod2 pj1/
>    for f in pj2 pj3 pj4
>    do
>        ln -s $REALCVS/$f .
>    done
>
> Then do a multiproject conversion with projects pj1, pj2, ...

If I have several of them - can I convert all these once at a time?
Won't this break the historical order of revisions like it can happen
if I convert one project at a time?

That still makes final deployment planning rather complicated - there
are more things that can break on the way. New requirements can popup
to redo the conversion, new combinations should be tried in case some
project is left from a tag or branch. Managing this kind of
information with symlinks can be kind of tricky, esp. for people not
proficient in shell scripts or linux filesystem.


Is it possible to embed this functionality into cvs2svn itself? I can
see that add_project() can be modified to accept list of CVS source
directories instead of just the only one. So, I've tried to analyze if
it is possible, but need some help:

[1] add_project() is defined in svn_run_options.py
[2] project_cvs_repos_path (that is to be converted to a list) is a
first argument to add_project()
[3] project_cvs_repos_path is directly passed to Project()
constructor, resulting project is added to a list of projects and
that's all for svn_run_options.py

[4] Project() constructor in project.py receives
project_cvs_repos_path argument that is to be transformed to the list
[5] project_cvs_repos_path is used to set (6)
Project.project_cvs_repos_path, (7) Project.cvs_repository_root and
(8) Project.cvs_module, it is also used in (9) Project.__str__()

[6] Project.project_cvs_repos_path is transformed to the list. This
affects CVSDirectory.get_filename() in some cases. Why can't
CVSDirectory be self-sufficient?

[7] Project.cvs_repository_root is not transformed to the list. We
just need to make sure that all paths share the same repository.

[8] Project.cvs_module should be converted to a list and it probably
causes most issues. cvs_module is the path to conversion root within
CVS repository - not ordinary "CVS module" listed in CVSROOT/modules
file. cvs_module is used for comparisons of projects in (10)
Project.__cmp__(), in  (11) CVSRevisionReader.get_content_stream() and
in (12) InternalRevisionReader._KeywordExpander.source() function

[9] Project.__str__() that uses self.project_cvs_repos_path - no idea
if it is used for some logic or just in error messages. I guess the
best way to figure this out is to set logging and see for myself, but
I am pretty limited here on windows both in time and tools at my
disposal to quickly setup development environment for cvs2svn. Servers
are running linux, but again - I find it very competing and
time-consuming to study code from shell/vim.

[10] Project.__cmp__() - the same here. It is very hard to track usage
of comparisons with static visual code analysis. Here I again need you
expertise to say if conversion of cvs_module to a list won't break
some parts of application.

[11] CVSRevisionReader.get_content_stream() - that's also requires
developers attention

[12] InternalRevisionReader._KeywordExpander.source() - here I also
can't be sure what workaround is needed.


So, are these modifications possible? Will they do that is expected?

BTW, do you have Google Wave account?

Thanks.
-- 
anatoly t.

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

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.