Re: Help with importing all CVS projects (tags, branches and trunks)

Mark-E <[email protected]>
Newsgroups gmane.comp.version-control.subversion.cvs2svn.user
Message-ID <[email protected]>
mhagger wrote:
> 
> Mark-E wrote:
>> I am working on a CVS to SVN Migration and I am working with the cvs2svn
>> script. 
>> It works well except the default behavior creates the repository
>> different
>> than how I want. 
>> 
>> tags
>>   --- project A
>>   --- project B
>> 
>> branches
>>   --- project A
>>   --- project B
>> 
>> trunk 
>>   --- project A
>>   --- project B
>> 
>> When I import all my CVS code, I would prefer the repository be setup as
>> follows:
>> 
>> project A
>>   --- trunk
>>   --- tags
>>   --- branches
>> 
>> project B
>>   --- tags
>>   --- branches
>>   --- trunk
>> 
>> I see with the optionsfile I can do this however the instructions show
>> how
>> to do it listing individual projects in CVS. I have several hundred
>> projects
>> that I want to setup like this. That would take a lot of time to list all
>> of
>> the projects.
>> 
>> Has anyone does this or does anyone know if you can easily import in this
>> format globally? 
>> It is just not clear to me from the instructions on how or if I can do
>> this
>> w/out explicitly listing all projects in the options file.
> 
> The options file is Python code, so you can just write a loop in Python:
> 
> projects = [
>     'A',
>     'B',
>     'C',
>     # ...
>     ]
> 
> for project in projects:
>     run_options.add_project(
>         r'test-data/main-cvsrepos/' + project,
>         trunk_path=(project + '/trunk'),
>         branches_path=(project + '/branches'),
>         tags_path=(project + '/tags'),
>         # ...
>         )
> 
> If you want to get really fancy, you could read the project names out of
> a data file.  Or even by listing the directories inside your main CVS
> repository:
> 
> import os
> cvs_repo_main_dir = r'test-data/main-cvsrepos'
> projects = os.listdir(cvs_repo_main_dir)
> projects.remove('CVSROOT') # Probably don't want to convert CVSROOT!
> 
> for project in projects:
>     # ...
> 
> Michael
> 
> ------------------------------------------------------
> http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1670&dsMessageId=2393188
> 
> To unsubscribe from this discussion, e-mail:
> [[email protected]].
> 
> 


Thanks for the suggestion Mike. I implemented a loop in the cvs2svn to get
multiple projects from the CVS repository and so far so good. It seems to be
working well.

Regards,
Mark

-- 
View this message in context: http://www.nabble.com/Help-with-importing-all-CVS-projects-%28tags%2C-branches-and-trunks%29-tp25370094p25472738.html
Sent from the cvs2svn - users mailing list archive at Nabble.com.

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

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.