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
|
Rev | Line | |
---|
[1866] | 1 | #!/usr/bin/python |
---|
| 2 | |
---|
| 3 | import sys |
---|
| 4 | import subprocess |
---|
[1869] | 5 | import shutil |
---|
[1866] | 6 | |
---|
| 7 | def clonePackage(base, pkg): |
---|
| 8 | # Use --no-follow-parent because we're going to handle that with |
---|
| 9 | # grafts. |
---|
[1870] | 10 | subprocess.check_call(['git', 'svn', 'clone', '--no-follow-parent', |
---|
| 11 | '--no-metadata', '%s/packages/%s' % (base, pkg)], |
---|
[1866] | 12 | stdout=subprocess.PIPE) |
---|
[1869] | 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) |
---|
[1866] | 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.