Skip to content

Commit 800fbbb

Browse files
author
thomas.heller
committed
A shell script that will help extracting a comtypes SVN repository out
of the Python SVN repo. --HG-- extra : convert_revision : svn%3Aa2f44796-8cc0-49ac-b43f-6a96d556d52d/trunk%40346
1 parent 8776b1b commit 800fbbb

File tree

2 files changed

+483
-0
lines changed

2 files changed

+483
-0
lines changed

admin/extract-comtypes-repo

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/sh
2+
3+
# This script extracts the comtypes repository from the svn.python.org repository.
4+
5+
if test ! -d mirror
6+
then {
7+
svnadmin create mirror
8+
cat <<'EOF' > mirror/hooks/pre-revprop-change
9+
#!/bin/sh
10+
USER="$3"
11+
12+
if [ "$USER" = "svnsync" ]; then exit 0; fi
13+
14+
echo "Only the svnsync user can change revprops" >&2
15+
exit 1
16+
EOF
17+
18+
chmod +x mirror/hooks/pre-revprop-change
19+
svnsync init --username svnsync file://`pwd`/mirror http://svn.python.org/projects/
20+
}
21+
fi
22+
23+
svnsync sync file://`pwd`/mirror
24+
25+
if test ! -f svn.python.org-dumpfile
26+
then {
27+
echo "Dumping svn.python.org SVN repository mirror, this may take an hour or so."
28+
date
29+
svnadmin dump ./mirror -r 40000:HEAD > svn.python.org-dumpfile
30+
date
31+
} fi
32+
33+
if test ! -f comtypes-dumpfile
34+
then {
35+
echo "Filtering comtypes out of the svn.python.org SVN repository dumpfile, this may take some minutes."
36+
date
37+
cat svn.python.org-dumpfile | ./svndumpfilter2 --drop-empty-revs ./mirror ctypes/trunk/comtypes ctypes/branches/comtypes* ctypes/tags/comtypes* >comtypes-dumpfile
38+
date
39+
rm -fr comtypes-repo
40+
} fi
41+
42+
if test ! -d comtypes-repo
43+
then {
44+
svnadmin create comtypes-repo
45+
svn mkdir file://`pwd`/comtypes-repo/ctypes -m "Create initial structure"
46+
svn mkdir file://`pwd`/comtypes-repo/ctypes/trunk -m "Create initial structure"
47+
svn mkdir file://`pwd`/comtypes-repo/ctypes/branches -m "Create initial structure"
48+
svn mkdir file://`pwd`/comtypes-repo/ctypes/tags -m "Create initial structure"
49+
svnadmin load comtypes-repo < comtypes-dumpfile
50+
} fi

0 commit comments

Comments
 (0)