source: trunk/scripts/git-migration/git-migrate @ 1868

Last change on this file since 1868 was 1868, checked in by broder, 16 years ago

Use check_call instead of call to make sure things error out.

  • Property svn:executable set to *
File size: 568 bytes
Line 
1#!/usr/bin/python
2
3import sys
4import subprocess
5
6def clonePackage(base, pkg):
7    # Use --no-follow-parent because we're going to handle that with
8    # grafts.
9    subprocess.check_call(['git', 'svn', 'clone', '--no-follow-parent', '%s/packages/%s' % (base, pkg)],
10                    stdout=subprocess.PIPE)
11
12def cloneAllPackages(base):
13    for pkg in open('package-list'):
14        clonePackage(base, pkg.strip())
15
16if __name__ == '__main__':
17    try:
18        base = sys.argv[1]
19    except:
20        base = 'svn://invirt.mit.edu/trunk'
21   
22    cloneAllPackages(base)
Note: See TracBrowser for help on using the repository browser.