Re: Non-unique tag names across projects that should not be merged during conversion to svn

Michael Haggerty <[email protected]>
Newsgroups gmane.comp.version-control.subversion.cvs2svn.user
Message-ID <[email protected]>
On 06/27/2011 05:38 PM, Vasanth Velusamy wrote:
> I tried the multiproject conversion approach. Even though it migrates
> all the non-unique tags correctly (to different tag folders, such as,
> SVNURL/ProjA/tags, SVNURL/ProjB/tags), it did the same for trunk and
> branches as well. But that is not the structure I am aiming for. I would
> like to see one common trunk and branches at the root. I tried changing
> the trunk/branches/tags_path option for each of the project, but it
> didn't give me the structure I wanted. I would like either of these two
> output structures:
> 
> SVNURL/
>     /branches
>         /<list of all branches, merged from all the projects>
>     /tags
>         /ProjA
>             /Build-1
>             /Build-2
>             /...
>         /ProjB
>             /Build-1
>             /Build-2
>             /...
>     /trunk
>         /ProjA content
>         /ProjB content
> 
> or
> 
> SVNURL/
>     /branches
>         /<list of all branches, merged from all the projects>
>     /tags
>         /ProjA-Build-1
>         /ProjA-Build-2
>         /...
>         /ProjB-Build-1
>         /ProjB-Build-2
>         /...
>     /trunk
>         /ProjA content
>         /ProjB content
> 
> So I suppose I am back to looking at SymbolMapper, SubtreeSymbolMapper?
> If so, any suggestions in that area?

You do not specify how you want the branches subdirectory to be
organized.  Do most branches cover all projects?

You definitely have tags with a single name that you want treated as two
separate tags (for example Build-1 in ProjA and Build-1 in ProjB).
There are two ways of splitting up a single CVS tag into multiple
Subversion tags:

1. Treat the subtrees that should be tagged separately into separate
projects.  As you observe, this also has implications for how trunk and
branches are treated across projects, so this seems unacceptable to you.

2. Using the SymbolTransform classes (like SymbolMapper and
SubtreeSymbolTransform) to rename the symbols differently in the
different subtrees.

Since (1) doesn't meet your requirements, you should try (2).  This
means treating the whole repository as a single project, but mapping the
tags to different names.  For example, you could remap "Build-1" via
something like

    SubtreeSymbolTransform(
        'ProjA',
        RegexpSymbolTransform(r'Build-1', 'ProjA-Build-1')
        )

Please note that this does not force you to put the tag in a path called
"tags/ProjA-Build-1", because you can *also* use a symbol StrategyRule
(e.g., a SymbolHintsFileRule) to tell cvs2svn to put tag 'ProjA-Build-1'
in an arbitrary path, for example 'tags/ProjA/Build-1'.

Please note that having dozens of SymbolTransform rules can be quite
expensive in terms of conversion time, because every rule is applied to
every symbol in every file.  You could probably save some of that time
by grouping the SymbolTransforms cleverly and/or writing your own custom
symbol transform.  Custom code would probably also save you time writing
the configuration for your conversion.

Whether this all works out depends on what you want in your branches
hierarchy.

Michael

-- 
Michael Haggerty
[email protected]
http://softwareswirl.blogspot.com/

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

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.