On Thu, Jan 12, 2006 at 08:34:52AM -0700, Adam Fedor wrote: > I hope to migrate GNUstep to SVN within a few weeks, but I'm not sure > of the exact timing.
I've written a script that a.) downloads gnustep cvs repository b.) downloads cvs2svn c.) applies some patches to cvs2svn to allow multiple projects per repository during the conversion d.) reorganizes the downloaded cvs repository e.) converts the repository to subversion f.) sets up the externals on /modules/* (which won't work until we have the repository up where it will be in the future) g.) redumps the repository to a gzipped incremental svn dump that can be sent to the folks at gna.org Overall, it takes about 1 hour and 15 minutes on my AMD Athlon 64 2800+ to do the full conversion. The results can be seen at http://websvn.aeruder.net If people could take a look and verify that things look correct, that would be very helpful. The only part of the conversion that I =know= is not going smoothly is the README in dev-libs/db/eoadaptors which seems to have a corrupted RCS file. For now I just have the script moving the RCS file out of repository before the conversion and then I'm importing the actual README,v RCS file into the repository afterwards (so that the information can be extracted later, hopefully). But maybe I'll take a look at the RCS file and see I can repair it... There are also several other slightly corrupted RCS files in the gnustep repository, but I've made a small change to cvs2svn to hopefully allow those to convert correctly. Assuming things look alright, that means that in a few hours we'd be able to migrate from one system to the other (assuming we can get the gna.org people to be standing by for the importing into their system). Heck, perhaps we can get the gna.org folks to do the conversion on their system ;) I've attached the script if anyone else wants to play. ( although I haven't tried it on any system but mine, so YMMV especially on the prereqs for the cvs2svn utility ). I'm still importing the repository into my server, so if everything isn't there when you get the email, wait a little while and hit refresh :). (There's > 22000 revisions). - Andy -- Andrew Ruder http://www.aeruder.net
#!/bin/sh logfile=conversion.log trap "exit 1" ERR exec 3>&1 exec > $logfile 2>&1 export loc=`pwd` status() { echo STATUS: "$@" >&3 echo STATUS: "$@" } update_gnustep() { trap "exit 1" ERR status "Downloading GNUstep CVS" rsync -zar --delete cvs.savannah.gnu.org::sources/gnustep/ gnustep-cvs } download_cvs2svn() { trap "exit 1" ERR if ! [ -d "cvs2svn" ]; then status "Downloading revision 1803 of cvs2svn" svn co --username guest --password guest -r 1803 http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn fi status "Downloading sublevel patch" rm -f cvs2svn-level.patch wget http://dump.aeruder.net/patches/cvs2svn-level.patch status "Downloading multiple definitions patch" rm -f cvs2svn-ignore-multiple-definitions.patch wget http://dump.aeruder.net/patches/cvs2svn-ignore-multiple-definitions.patch status "Applying patches to cvs2svn" svn revert cvs2svn/cvs2svn cd cvs2svn patch -p1 < ../cvs2svn-level.patch patch -p1 < ../cvs2svn-ignore-multiple-definitions.patch cd .. rm -f cvs2svn-level.patch rm -f cvs2svn-ignore-multiple-definitions.patch } reorganize_repository() { trap "exit 1" ERR rm -fr reorganized status "Making copy of gnustep CVS repository for reorganization" rsync -ar gnustep-cvs/gnustep/ reorganized status "Reorganizing..." cd reorganized mkdir {apps,libs,tools} mv -v dev-apps/Gorm apps/gorm mv -v dev-apps/EasyDiff apps/easydiff mv -v dev-apps/ProjectCenter apps/projectcenter mv -v usr-apps/GSLDAPWebExplorer apps/gsldapwebexplorer mv -v usr-apps/gworkspace apps/gworkspace mv -v usr-apps/SystemPreferences apps/systempreferences mv -v core/back libs/back mv -v core/base libs/base mv -v dev-libs/db libs/db mv -v dgs libs/dgs mv -v dev-libs/extensions libs/extensions mv -v dev-libs/gdl2 libs/gdl2 mv -v dev-libs/gsantlr libs/gsantlr mv -v dev-libs/gscrypt libs/gscrypt mv -v dev-libs/gsgd libs/gsgd mv -v dev-libs/gsldap libs/gsldap mv -v core/gui libs/gui mv -v dev-libs/gsweb libs/gsweb mv -v dev-libs/guile libs/guile mv -v dev-libs/java libs/java mv -v dev-libs/libobjc libs/libobjc mv -v dev-libs/palettes libs/palettes mv -v dev-libs/Performance libs/performance mv -v dev-libs/ppd libs/ppd mv -v dev-libs/Renaissance libs/renaissance mv -v dev-libs/ruby libs/ruby mv -v dev-libs/SMBKit libs/smbkit mv -v dev-libs/SQLClient libs/sqlclient mv -v dev-libs/StepTalk libs/steptalk mv -v dev-libs/ucsdata libs/ucsdata mv -v dev-libs/WebServer libs/webserver mv -v core/xdps libs/xdps mv -v core/xgps libs/xgps mv -v dev-apps/test tests mv -v usr-apps/examples tests mv -v dev-apps/charsets tools/charsets mv -v core/make tools/make mv -v dev-apps/model-main tools/model-main mv -v dev-apps/nfmake tools/nfmake mv -v Startup tools/startup mv -v core tools/core # This will be moved out later rmdir dev-libs rmdir dev-apps rmdir usr-apps cd .. status "Salvaging the one massively broken RCS file" rm -fr broken mkdir broken mv -v reorganized/libs/db/eoadaptors/README,v broken } start_conversion() { trap "exit 1" ERR export PYTHONPATH="$loc/cvs2svn" status "Converting the reorganized CVS to subversion (this takes a while)" rm -fr svnrepos cvs2svn/cvs2svn --level=2 --force-branch=freeze-1_0_0 \ --force-branch=gnustep-gui --force-branch=gnustep-xdps \ --force-branch=make --force-branch=test --force-branch=gnustep-db \ --force-branch=dgs --username=gnu --cvs-revnum -s svnrepos reorganized rm -rf reorganized } last_mods() { trap "exit 1" ERR status "Making mods to repos (externals, adding in broken files, etc.)" export url="file://$loc/svnrepos" svn import --username gnu \ -m "Adding in the RCS (broken) file of the readme" \ broken/README,v $url/libs/db/trunk/eoadaptors/README,v rm -rf broken svn mkdir --username gnu -m "Setting up modules directory structure" \ $url/modules $url/modules/dev-libs $url/modules/dev-apps \ $url/modules/usr-apps $url/modules/tests svn mv --username gnu -m "Restoring core module" \ $url/tools/core/trunk $url/modules/core svn delete --username gnu -m "Deleting core remains" \ $url/tools/core bu=http://svn.gna.org/svn/gnustep cat > propset.items <<PL gui $bu/libs/gui/trunk back $bu/libs/back/trunk base $bu/libs/base/trunk make $bu/tools/make/trunk PL svn co $url/modules/core propset.target svn propset --username gnu \ --non-interactive svn:externals -F propset.items propset.target svn commit -m "Setting up svn:externals" propset.target rm -fr propset.target cat > propset.items <<PL charsets $bu/tools/charsets/trunk easydiff $bu/apps/easydiff/trunk gorm $bu/apps/gorm/trunk model-main $bu/tools/model-main/trunk nfmake $bu/tools/nfmake/trunk projectcenter $bu/apps/projectcenter/trunk PL svn co $url/modules/dev-apps propset.target svn propset --username gnu \ --non-interactive svn:externals -F propset.items propset.target svn commit -m "Setting up svn:externals" propset.target rm -fr propset.target cat > propset.items <<PL charsets $bu/tools/charsets/trunk easydiff $bu/apps/easydiff/trunk gorm $bu/apps/gorm/trunk model-main $bu/tools/model-main/trunk nfmake $bu/tools/nfmake/trunk projectcenter $bu/apps/projectcenter/trunk PL svn co $url/modules/tests propset.target svn propset --username gnu \ --non-interactive svn:externals -F propset.items propset.target svn commit -m "Setting up svn:externals" propset.target rm -fr propset.target cat > propset.items <<PL db $bu/libs/db/trunk extensions $bu/libs/extensions/trunk gdl2 $bu/libs/gdl2/trunk gsantlr $bu/libs/gsantlr/trunk gscrypt $bu/libs/gscrypt/trunk gsgd $bu/libs/gsgd/trunk gsldap $bu/libs/gsldap/trunk gsweb $bu/libs/gsweb/trunk guile $bu/libs/guile/trunk java $bu/libs/java/trunk libobjc $bu/libs/libobjc/trunk palettes $bu/libs/palettes/trunk performance $bu/libs/performance/trunk ppd $bu/libs/ppd/trunk renaissance $bu/libs/renaissance/trunk ruby $bu/libs/ruby/trunk smbkit $bu/libs/smbkit/trunk sqlclient $bu/libs/sqlclient/trunk steptalk $bu/libs/steptalk/trunk ucsdata $bu/libs/ucsdata/trunk webserver $bu/libs/webserver/trunk PL svn co $url/modules/dev-libs propset.target svn propset --username gnu \ --non-interactive svn:externals -F propset.items propset.target svn commit -m "Setting up svn:externals" propset.target rm -fr propset.target cat > propset.items <<PL systempreferences $bu/apps/systempreferences/trunk gworkspace $bu/apps/gworkspace/trunk gsldapwebexplorer $bu/apps/gsldapwebexplorer/trunk examples $bu/tests/examples/trunk PL svn co $url/modules/usr-apps propset.target svn propset --username gnu \ --non-interactive svn:externals -F propset.items propset.target svn commit -m "Setting up svn:externals" propset.target rm -fr propset.target rm -f propset.items } final_dump() { trap "exit 1" ERR status "Redumping the repository into an incremental dump (takes a while)" svnadmin dump svnrepos --incremental --deltas | gzip > gnustep.dump.gz } status "Welcome to the gnustep CVS conversion utility" status "Feel free to follow along the steps in $logfile" update_gnustep download_cvs2svn reorganize_repository start_conversion last_mods final_dump status "All done." status "Repository output in: svnrepos/" status "Dumpfile output in: gnustep.dump.gz" status "Log output in: $logfile"
_______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnustep-dev