[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

cvs2svn conversion

From: Andreas Jellinghaus <aj_at_dungeon.inka.de>
Date: 2004-02-24 14:33:12 CET

ok, I gave it another try.
I exported three modules seperately, did some sed on the branch names,
imported them, and the trunk looks fine:
trunk/htdocs/*
trunk/openct/*
trunk/opensc/*
each directory with the right source.

but the tags/branches are mixed up. because people didn't use them
consistently, I ran cvs2svn with --tags=tags --branches=tags.
I used sed on the openct file to rename tags/RELEASE_0_5_0 to
tags/openct-0.5.0 and on opensc file to rename tags/RELEASE_0_5_0
to tags/opensc-0.5.0 to avoid name clashes.

I expected to have a tags/opensc-0.8.0 directory with the content
of opensc at that time. But instead I get:

./opensc-0.5.0
./opensc-0.5.0/htdocs
./opensc-0.5.0/opensc
./opensc-0.5.0/openct
./openct-0.5.0
./openct-0.5.0/htdocs
./openct-0.5.0/openct

why is htdocs/* and openct/* stuff in the opensc-0.5.0 tag directory?
why is the opensc/ files in a subdirectory?

is there a way I can create the desired structure?

so far I did:
# get a local copy of the cvs repository
rsync -e ssh -avr opensc.org:/home/opensc/cvsroot .

# create directories for each module, copy (or move) the dirs we want in
# each module.
mkdir openct
mkdir opensc
mkdir htdocs
cp -a cvsroot/openct openct
cp -a cvsroot/opensc opensc
cp -a cvsroot/www htdocs/htdocs

# extract openct
/home/aj/subversion/src/subversion-1.0.0/tools/cvs2svn/cvs2svn.py \
        --dump-only --branches=tags --tags=tags openct
mv cvs2svn-dump openct.svndump

# extract opensc. the macos/ directory has broken files (branch<->tag
problems)
rm -rf opensc/opensc/macos/
/home/aj/subversion/src/subversion-1.0.0/tools/cvs2svn/cvs2svn.py \
        --dump-only --branches=tags --tags=tags opensc
mv cvs2svn-dump opensc.svndump
   
# extract htdocs. we don't need tags or revisions.
/home/aj/subversion/src/subversion-1.0.0/tools/cvs2svn/cvs2svn.py \
        --dump-only --trunk-only htdocs
mv cvs2svn-dump htdocs.svndump

# tags/ and trunk/ node should only be created once.
edit openct.svndump to remove the first section adding trunk directory
edit opensc.svndump to remove the first section adding trunk directory
edit opensc.svndump to remove the first section adding tags directory

# rename openct tags from RELEASE_* to openct-*
cat openct.svndump | sed \
   -e "s#Node-path: tags/RELEASE_0_1_0#Node-path: tags/openct-0.1.0#g" \
   -e "s#Node-path: tags/RELEASE_0_5_0#Node-path: tags/openct-0.5.0#g" \
> openct.fixed.svndump

# rename opensc tags from RELEASE_* to openct-*
cat opensc.svndump | sed \
   -e "s#Node-path: tags/RELEASE_0_4_0#Node-path: tags/opensc-0.4.0#g" \
   -e "s#Node-path: tags/RELEASE_0_5_0#Node-path: tags/opensc-0.5.0#g" \
   -e "s#Node-path: tags/RELEASE_0_6_0#Node-path: tags/opensc-0.6.0#g" \
   -e "s#Node-path: tags/RELEASE_0_6_0#Node-path: tags/opensc-0.6.1#g" \
   -e "s#Node-path: tags/RELEASE_0_6_1-patches#Node-path:
tags/opensc-0.6.1-patches#g" \
   -e "s#Node-path: tags/RELEASE_0_7_0#Node-path: tags/opensc-0.7.0#g" \
   -e "s#Node-path: tags/RELEASE_0_8_0#Node-path: tags/opensc-0.8.0#g" \
   -e "s#Node-path: tags/RELEASE_0_8_1#Node-path: tags/opensc-0.8.1#g" \
> opensc.fixed.svndump

# create the repository
/home/aj/subversion/bin/svnadmin create /home/aj/subtest/opensc

# load htdocs
/home/aj/subversion/bin/svnadmin load \
        /home/aj/subtest/opensc < htdocs.svndump

# load openct
/home/aj/subversion/bin/svnadmin load \
        /home/aj/subtest/opensc < openct.fixed.svndump

# load opensc
/home/aj/subversion/bin/svnadmin load \
        /home/aj/subtest/opensc < opensc.fixed.svndump

# create a working copy somewhere and check out
cd /home/aj/subtest
mkdir wc
cd wc
/home/aj/subversion/bin/svn checkout file:///home/aj/subtest/opensc

Regards, Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Feb 24 14:50:18 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.