Last change
on this file since 1871 was
1871,
checked in by broder, 16 years ago
|
Use an authors file to fill in committer identities.
|
-
Property svn:executable set to
*
|
File size:
903 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', |
---|
[1871] | 11 | '-Aauthors', |
---|
[1870] | 12 | '--no-metadata', '%s/packages/%s' % (base, pkg)], |
---|
[1866] | 13 | stdout=subprocess.PIPE) |
---|
[1869] | 14 | |
---|
| 15 | # Then make the repository bare, because git-svn can't do this |
---|
| 16 | shutil.move('%s/.git' % pkg, '%s.git' % pkg) |
---|
| 17 | shutil.rmtree('%s' % pkg) |
---|
| 18 | subprocess.check_call(['git', 'config', 'core.bare', 'true'], cwd='%s.git' % pkg) |
---|
[1866] | 19 | |
---|
| 20 | def cloneAllPackages(base): |
---|
| 21 | for pkg in open('package-list'): |
---|
| 22 | clonePackage(base, pkg.strip()) |
---|
| 23 | |
---|
| 24 | if __name__ == '__main__': |
---|
| 25 | try: |
---|
| 26 | base = sys.argv[1] |
---|
| 27 | except: |
---|
| 28 | base = 'svn://invirt.mit.edu/trunk' |
---|
| 29 | |
---|
| 30 | cloneAllPackages(base) |
---|
Note: See
TracBrowser
for help on using the repository browser.