You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Andreas Jellinghaus <aj...@dungeon.inka.de> on 2004/02/24 13:33:12 UTC

cvs2svn conversion

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

Re: cvs2svn bug? or user error?

Posted by Stephen Peters <po...@portnoy.org>.
kfogel@collab.net writes:

> This is definitely a bug -- one I thought we'd fixed, too.  See r8544
> and resolved issue #1427.  (You are using the most recent cvs2svn.py,
> right?)

Turns out I wasn't.  I'd managed to get a computer with a 0.37 install
instead.  Getting the latest, greatest made everything work fine.  Thanks!

-- 
Stephen L. Peters                                  portnoy@portnoy.org
  GPG fingerprint: A1BF 5A81 03E7 47CE 71E0  3BD4 8DA6 9268 5BB6 4BBE
 "I'm through accepting limits, 'cause someone says they're so.  Some
  things I cannot change, but 'til I try I'll never know." -- Wicked

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: cvs2svn bug? or user error?

Posted by kf...@collab.net.
Stephen Peters <po...@portnoy.org> writes:
> Hi.  I'm trying to run cvs2svn on a rather large repository, and I
> encountered a "Reference to non-existent revision' error which meant
> that it stopped in the middle of pass 5.  After cutting the test case
> down to a couple of files, I think it might be because it's trying to
> create a branch and commit to the trunk in the same revision, but I'm
> not sure.  The output of cvs2svn is below, and I can provide the test
> case files if necessary.
> 
> I'm pretty sure this is a bug, but I'm willing to believe I'm doing
> something wrong.  Any suggestions?

This is definitely a bug -- one I thought we'd fixed, too.  See r8544
and resolved issue #1427.  (You are using the most recent cvs2svn.py,
right?)

If this reproduces with HEAD of cvs2svn, can you file an issue and
include your reproduction data?  Thanks for having narrowed it down to
a couple of files, by the way.  That will save us acres of time in
debugging!

-Karl

> =========== cvs2svn output ==============
> 
> portnoy> cvs2svn --create -s /work/svn-tests/svn /work/svn-tests/cvs
> ----- pass 1 -----
> /work/svn-tests/cvs/core/MetaglueClassLoader.java,v
> /work/svn-tests/cvs/core/Attic/files,v
> ----- pass 2 -----
> ----- pass 3 -----
> ----- pass 4 -----
> committing: Tue Jun  9 15:21:23 1998, over 0 seconds
>     adding or changing 1.1 : trunk/core/files
>     new revision: 1
> committing: Thu Apr 26 16:30:13 2001, over 0 seconds
>     adding or changing 1.28 : trunk/core/files
>     new revision: 2
> committing: Thu Jun 28 00:02:34 2001, over 187 seconds
>     adding or changing 1.1 : trunk/core/MetaglueClassLoader.java
>     adding or changing 1.28.2.1 : branches/classloader-testing/core/files
>     new revision: 3
> committing: Thu Jun 28 16:03:49 2001, over 0 seconds
>     adding or changing 1.1.2.1 : branches/classloader-testing/core/MetaglueClassLoader.java
>     new revision: 4
> committing: Sat Jun 30 15:23:44 2001, over 0 seconds
>     adding or changing 1.1.2.8 : branches/classloader-testing/core/MetaglueClassLoader.java
>     new revision: 5
> committing: Fri Nov  9 19:22:23 2001, over 0 seconds
>     deleting 1.42 : trunk/core/files
>     (deleted trunk/core/files)
>     new revision: 6
> Finishing branches:
> finishing 'classloader-testing' as branch
> Finishing tags:
> finishing 'classloader-testing' as tag
> ----- pass 5 -----
> loading cvs2svn-dump into /work/svn-tests/svn
> <<< Started new transaction, based on original revision 1
>      * adding path : trunk ... done.
>      * adding path : trunk/core ... done.
>      * adding path : trunk/core/files ... done.
>  
> ------- Committed revision 1 >>>
>  
> <<< Started new transaction, based on original revision 2
>      * editing path : trunk/core/files ... done.
>  
> ------- Committed revision 2 >>>
>  
> <<< Started new transaction, based on original revision 3
>      * adding path : trunk/core/MetaglueClassLoader.java ... done.
>      * adding path : branches ... done.
>      * adding path : branches/classloader-testing ...svn: Reference to non-existent revision '3' in filesystem '/work/svn-tests/svn/db'
> pass 1: 0 seconds
> pass 2: 0 seconds
> pass 3: 0 seconds
> pass 4: 0 seconds
> pass 5: 1 seconds
>  total: 2 seconds
> 
> -- 
> Stephen L. Peters                                  portnoy@portnoy.org
>   GPG fingerprint: A1BF 5A81 03E7 47CE 71E0  3BD4 8DA6 9268 5BB6 4BBE
> 	    "Love your neighbor, forgive, keep your vows.
>   And a mountain's no place to raise cows." -- Bat Boy: The Musical
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

cvs2svn bug? or user error?

Posted by Stephen Peters <po...@portnoy.org>.
Hi.  I'm trying to run cvs2svn on a rather large repository, and I
encountered a "Reference to non-existent revision' error which meant
that it stopped in the middle of pass 5.  After cutting the test case
down to a couple of files, I think it might be because it's trying to
create a branch and commit to the trunk in the same revision, but I'm
not sure.  The output of cvs2svn is below, and I can provide the test
case files if necessary.

I'm pretty sure this is a bug, but I'm willing to believe I'm doing
something wrong.  Any suggestions?

=========== cvs2svn output ==============

portnoy> cvs2svn --create -s /work/svn-tests/svn /work/svn-tests/cvs
----- pass 1 -----
/work/svn-tests/cvs/core/MetaglueClassLoader.java,v
/work/svn-tests/cvs/core/Attic/files,v
----- pass 2 -----
----- pass 3 -----
----- pass 4 -----
committing: Tue Jun  9 15:21:23 1998, over 0 seconds
    adding or changing 1.1 : trunk/core/files
    new revision: 1
committing: Thu Apr 26 16:30:13 2001, over 0 seconds
    adding or changing 1.28 : trunk/core/files
    new revision: 2
committing: Thu Jun 28 00:02:34 2001, over 187 seconds
    adding or changing 1.1 : trunk/core/MetaglueClassLoader.java
    adding or changing 1.28.2.1 : branches/classloader-testing/core/files
    new revision: 3
committing: Thu Jun 28 16:03:49 2001, over 0 seconds
    adding or changing 1.1.2.1 : branches/classloader-testing/core/MetaglueClassLoader.java
    new revision: 4
committing: Sat Jun 30 15:23:44 2001, over 0 seconds
    adding or changing 1.1.2.8 : branches/classloader-testing/core/MetaglueClassLoader.java
    new revision: 5
committing: Fri Nov  9 19:22:23 2001, over 0 seconds
    deleting 1.42 : trunk/core/files
    (deleted trunk/core/files)
    new revision: 6
Finishing branches:
finishing 'classloader-testing' as branch
Finishing tags:
finishing 'classloader-testing' as tag
----- pass 5 -----
loading cvs2svn-dump into /work/svn-tests/svn
<<< Started new transaction, based on original revision 1
     * adding path : trunk ... done.
     * adding path : trunk/core ... done.
     * adding path : trunk/core/files ... done.
 
------- Committed revision 1 >>>
 
<<< Started new transaction, based on original revision 2
     * editing path : trunk/core/files ... done.
 
------- Committed revision 2 >>>
 
<<< Started new transaction, based on original revision 3
     * adding path : trunk/core/MetaglueClassLoader.java ... done.
     * adding path : branches ... done.
     * adding path : branches/classloader-testing ...svn: Reference to non-existent revision '3' in filesystem '/work/svn-tests/svn/db'
pass 1: 0 seconds
pass 2: 0 seconds
pass 3: 0 seconds
pass 4: 0 seconds
pass 5: 1 seconds
 total: 2 seconds

-- 
Stephen L. Peters                                  portnoy@portnoy.org
  GPG fingerprint: A1BF 5A81 03E7 47CE 71E0  3BD4 8DA6 9268 5BB6 4BBE
	    "Love your neighbor, forgive, keep your vows.
  And a mountain's no place to raise cows." -- Bat Boy: The Musical

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: cvs2svn conversion

Posted by Tobias Ringström <to...@ringstrom.mine.nu>.
John Peacock wrote:

> Andreas Jellinghaus wrote:
>
>> 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:
>
>
> Please be aware that the dump file is a mostly human-readable, yet not 
> plain-text format.  In practice, if you are editing only the Node-path 
> value (as you did), you will probably be safe.  Global search/replaces 
> can bite you; just FYI.

You must not forget to change the Node-copyfrom-path header accordingly. 
A better solution is probably to search for the function 
Dumper.utf8_path in cvs2svn.py and be creative.

/Tobias


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: cvs2svn conversion

Posted by John Peacock <jp...@rowman.com>.
Andreas Jellinghaus wrote:

> 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:

Please be aware that the dump file is a mostly human-readable, yet not 
plain-text format.  In practice, if you are editing only the Node-path value (as 
you did), you will probably be safe.  Global search/replaces can bite you; just FYI.

That being said, cvs2svn is not 1.0 quality and doesn't include options to do 
what you want (i.e. arbitrary layouts).  However, you can easily move the 
directories around after importing, ala

	svn mv file:///home/aj/subtest/proj/trunk \
	file:///home/aj/subtest/trunk/proj

etc.  This will preserve history (but you won't be able to use ViewCVS to browse 
past the move).

HTH

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org