I don't actually want All Of Xen in our newly revised history.
[invirt/scripts/git-migration.git] / git-migrate
index 493f25e..aac76df 100755 (executable)
@@ -2,12 +2,20 @@
 
 import sys
 import subprocess
 
 import sys
 import subprocess
+import shutil
 
 def clonePackage(base, pkg):
     # Use --no-follow-parent because we're going to handle that with
     # grafts.
 
 def clonePackage(base, pkg):
     # Use --no-follow-parent because we're going to handle that with
     # grafts.
-    subprocess.call(['git', 'svn', 'clone', '--no-follow-parent', '%s/packages/%s' % (base, pkg)],
+    subprocess.check_call(['git', 'svn', 'clone', '--no-follow-parent',
+                           '-Aauthors',
+                           '--no-metadata', '%s/packages/%s' % (base, pkg)],
                     stdout=subprocess.PIPE)
                     stdout=subprocess.PIPE)
+    
+    # Then make the repository bare, because git-svn can't do this
+    shutil.move('%s/.git' % pkg, '%s.git' % pkg)
+    shutil.rmtree('%s' % pkg)
+    subprocess.check_call(['git', 'config', 'core.bare', 'true'], cwd='%s.git' % pkg)
 
 def cloneAllPackages(base):
     for pkg in open('package-list'):
 
 def cloneAllPackages(base):
     for pkg in open('package-list'):