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

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

An initial very, very rough draft of a svn->git conversion script.

  • Property svn:executable set to *
File size: 562 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.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.