CVS Repository migration

On 9 March 2003, the Cocoon CVS module, 'xml-cocoon2', was split up into 'cocoon-2.1' and 'cocoon-2.0' modules. See this email for full details.

This page describes how to update your old xml-cocoon2 checked-out module, so you don't have to checkout all 36mb again. It involves doing a search & replace in multiple CVS/* directories. I've used Perl for this job, by any other tool (sed?) could be used.

Change CVS/Repository

Every directory will have a CVS/Repository file. Previously, it contains just the string 'xml-cocoon2'. We want to change this to 'cocoon-2.1' or 'cocoon-2.0', depending on if we're checking out Cocoon 2.1 or 2.0.

To do this, we can either:

(substitute 2.0 for 2.1 to get Cocoon 2.0.x source)

Change CVS/Entries (cocoon-2.0)

This is only applicable for converting a 2.0.x directory to the 'cocoon-2.0' module. Here we have an extra requirement: strip the 'branch' indicator from every file's CVS/Entries entry:

/changes.xml/1.138.2.87/Wed Feb 19 00:36:46 2003//Tcocoon_2_0_3_branch
/todo.xml/1.28.2.8/Wed Feb 19 00:36:46 2003//Tcocoon_2_0_3_branch
/build.xml/1.196.2.28/Sat Mar  8 06:57:22 2003//Tcocoon_2_0_3_branch

This can be done with another 'find' command: find . -name "CVS" -type d -exec perl -i -pe 's:/Tcocoon_2_0_3_branch$:/:g' {}/Entries \;

Delete CVS/Tag (cocoon-2.0)

Also only applicable for converting to 'cocoon-2.0' module.

Each CVS directory will have a CVS/Tag file, containing the directory tag ('cocoon_2_0_3_branch'). These should simply be deleted with something like find . -name "CVS" -type d -exec rm {}/Tag \;


You can now do a cvs update on these repositories, and hopefully they should update. For some reason, CVS insists on updating (U) each file, but even so, this is faster than a full checkout.


Notes



Attachment: cvsmvrepo

CVSMigration (last edited 2009-09-20 23:41:21 by localhost)