Changeset 1874 for trunk/scripts/git-migration/git-migrate
- Timestamp:
- Dec 24, 2008, 5:46:11 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/git-migration/git-migrate
r1873 r1874 1 1 #!/usr/bin/python 2 2 3 import os 3 4 import sys 4 5 import subprocess … … 6 7 7 8 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 '-Aauthors', 12 '-q', 13 '--no-metadata', '%s/packages/%s' % (base, pkg)], 14 stdout=subprocess.PIPE) 15 16 # Then make the repository bare, because git-svn can't do this 17 shutil.move('%s/.git' % pkg, '%s.git' % pkg) 18 shutil.rmtree('%s' % pkg) 19 subprocess.check_call(['git', 'config', 'core.bare', 'true'], cwd='%s.git' % pkg) 9 if not os.path.isdir('%s.git' % pkg): 10 if os.path.isdir(pkg): 11 shutil.rmtree(pkg) 12 # Use --no-follow-parent because we're going to handle that with 13 # grafts. 14 subprocess.check_call(['git', 'svn', 'clone', '--no-follow-parent', 15 '-Aauthors', 16 '-q', 17 '--no-metadata', '%s/packages/%s' % (base, pkg)], 18 stdout=subprocess.PIPE) 19 20 # Then make the repository bare, because git-svn can't do this 21 shutil.move('%s/.git' % pkg, '%s.git' % pkg) 22 shutil.rmtree('%s' % pkg) 23 subprocess.check_call(['git', 'config', 'core.bare', 'true'], cwd='%s.git' % pkg) 20 24 21 25 def cloneAllPackages(base):
Note: See TracChangeset
for help on using the changeset viewer.