Last change
on this file since 1870 was
1870,
checked in by broder, 16 years ago
|
Use --no-metadata so we don't get extra crap in the changelog.
|
-
Property svn:executable set to
*
|
File size:
863 bytes
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
3 | import sys |
---|
4 | import subprocess |
---|
5 | import shutil |
---|
6 | |
---|
7 | def clonePackage(base, pkg): |
---|
8 | # Use --no-follow-parent because we're going to handle that with |
---|
9 | # grafts. |
---|
10 | subprocess.check_call(['git', 'svn', 'clone', '--no-follow-parent', |
---|
11 | '--no-metadata', '%s/packages/%s' % (base, pkg)], |
---|
12 | stdout=subprocess.PIPE) |
---|
13 | |
---|
14 | # Then make the repository bare, because git-svn can't do this |
---|
15 | shutil.move('%s/.git' % pkg, '%s.git' % pkg) |
---|
16 | shutil.rmtree('%s' % pkg) |
---|
17 | subprocess.check_call(['git', 'config', 'core.bare', 'true'], cwd='%s.git' % pkg) |
---|
18 | |
---|
19 | def cloneAllPackages(base): |
---|
20 | for pkg in open('package-list'): |
---|
21 | clonePackage(base, pkg.strip()) |
---|
22 | |
---|
23 | if __name__ == '__main__': |
---|
24 | try: |
---|
25 | base = sys.argv[1] |
---|
26 | except: |
---|
27 | base = 'svn://invirt.mit.edu/trunk' |
---|
28 | |
---|
29 | cloneAllPackages(base) |
---|
Note: See
TracBrowser
for help on using the repository browser.