Skip to content

Commit

Permalink
The script seems to work now.
Browse files Browse the repository at this point in the history
--HG--
extra : convert_revision : svn%3Aa2f44796-8cc0-49ac-b43f-6a96d556d52d/trunk%40349
  • Loading branch information
thomas.heller committed Jul 15, 2008
1 parent ab7e422 commit d8bd454
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions admin/extract-comtypes-repo
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,34 @@ then {
svnadmin dump ./mirror -r 40000:HEAD > svn.python.org-dumpfile
} fi

if test ! -f comtypes-dumpfile
if test ! -f ctypes-dumpfile
then {
rm -fr comtypes-repo
rm -fr comtypes-dumpfile
echo "Filtering ctypes out of the svn.python.org SVN repository dumpfile, this may take some minutes."
# It is important that we use svndumpfilter first to create a smaller dumpfile (5 GB reduced to 120 MB),
# otherwise svndumpfilter2 below will run out of memory.
cat svn.python.org-dumpfile | svndumpfilter include ctypes >ctypes-dumpfile
} fi

if test ! -f comtypes-dumpfile
then {
rm -fr comtypes-repo
echo "Filtering comtypes out of the ctypes dumpfile, this may take some minutes."
cat ctypes-dumpfile | ./svndumpfilter2 --drop-empty-revs --renumber-revs ./mirror ctypes/trunk/comtypes ctypes/branches/comtypes* ctypes/tags/comtypes* | sed "s/-path: ctypes\//-path: /g" >comtypes-dumpfile
# We include ctypes/trunk/comtypes, ctypes/branches/comtypes*, ctypes/tags/comtypes*
# Then we strip off the ctypes/ prefix, and rewrite 'trunk/comtypes' into 'trunk'
cat ctypes-dumpfile | ./svndumpfilter2 --drop-empty-revs --renumber-revs ./mirror ctypes/trunk/comtypes ctypes/branches/comtypes* ctypes/tags/comtypes* | sed "s/-path: ctypes\//-path: /g" | sed "s/-path: trunk\/comtypes/-path: trunk/g" >comtypes-dumpfile
} fi

if test ! -d comtypes-repo
then {
svnadmin create comtypes-repo
svn mkdir file://`pwd`/comtypes-repo/trunk -m "Create initial structure"
svn mkdir file://`pwd`/comtypes-repo/branches -m "Create initial structure"
svn mkdir file://`pwd`/comtypes-repo/tags -m "Create initial structure"
svnadmin load comtypes-repo < comtypes-dumpfile
} fi

# Create the dumpfile
svnadmin dump ./comtypes-repo | bzip2 > sfimportcomtypes.bz2
# and test it.
svnadmin create ./new-comtypes-repo
bzcat sfimportcomtypes.bz2 | svnadmin load ./new-comtypes-repo

0 comments on commit d8bd454

Please sign in to comment.